forked from circlecloud/tera
@@ -51,7 +51,7 @@ module.exports = class CConsensus extends require("./block-loader")
|
||||
this.CurrentBlockNum = 0
|
||||
this.SendBlockID = 0
|
||||
this.RelayMode = false
|
||||
this.TreeSendPacket = new RBTree(global.CompareItemHash)
|
||||
this.TreeSendPacket = new global.RBTree(global.CompareItemHash)
|
||||
if (!global.ADDRLIST_MODE && !this.VirtualMode) {
|
||||
this.idBlockChainTimer = setInterval(this.StartBlockChain.bind(this), global.CONSENSUS_PERIOD_TIME - 5)
|
||||
setInterval(this.DoTransfer.bind(this), global.CONSENSUS_CHECK_TIME)
|
||||
@@ -85,8 +85,8 @@ module.exports = class CConsensus extends require("./block-loader")
|
||||
Context.TransferFromAddr = {}
|
||||
Context.LevelsTransfer = []
|
||||
Context.ErrRun = ""
|
||||
Context.PowTxTree = new RBTree(global.CompareItemTimePow)
|
||||
Context.PowTicketTree = new RBTree(global.CompareItemTimePow)
|
||||
Context.PowTxTree = new global.RBTree(global.CompareItemTimePow)
|
||||
Context.PowTicketTree = new global.RBTree(global.CompareItemTimePow)
|
||||
Context.bSave = false
|
||||
Context.PrevHash = undefined
|
||||
Context.TreeHash = undefined
|
||||
@@ -692,7 +692,7 @@ module.exports = class CConsensus extends require("./block-loader")
|
||||
}
|
||||
AddPOWToMaxTree(POW, item) {
|
||||
if (!POW.MaxTree) {
|
||||
POW.MaxTree = new RBTree(function(a, b) {
|
||||
POW.MaxTree = new global.RBTree(function(a, b) {
|
||||
return global.CompareArr(a.PowHash, b.PowHash);
|
||||
})
|
||||
}
|
||||
@@ -1367,8 +1367,7 @@ module.exports = class CConsensus extends require("./block-loader")
|
||||
}
|
||||
}
|
||||
};
|
||||
let STreeBuffer = global.STreeBuffer;
|
||||
global.TreeBlockBuf = new STreeBuffer(50 * 1000, global.CompareItemHashSimple, "string");
|
||||
global.TreeBlockBuf = new global.STreeBuffer(50 * 1000, global.CompareItemHashSimple, "string");
|
||||
var PrevTimeIdle = 0;
|
||||
OnTimeIdle();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user