fix: method refactor error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-07-10 17:28:08 +08:00
parent 87a863a228
commit 812813da8d
21 changed files with 92 additions and 111 deletions

View File

@@ -13,7 +13,7 @@ const fs = require("fs");
import * as crypto from 'crypto';
require('./block-loader-const');
const STAT_BLOCK_LOAD_PERIOD = global.CONSENSUS_PERIOD_TIME / 5;
module.exports = class CBlock extends require("./rest-loader.js")
module.exports = class CBlock extends require("./rest-loader")
{
MapMapLoaded
BlockChain
@@ -1188,7 +1188,7 @@ module.exports = class CBlock extends require("./rest-loader.js")
GetHistoryTree(typedata) {
var Tree = global.HistoryBlockBuf.LoadValue(typedata, 1);
if (!Tree) {
Tree = new RBTree(global.CompareItemHash)
Tree = new global.RBTree(global.CompareItemHash)
global.HistoryBlockBuf.SaveValue(typedata, Tree)
}
return Tree;
@@ -1300,4 +1300,4 @@ global.LoadBlockFromNetwork = function(Params, F) {
F(1);
}
};
global.HistoryBlockBuf = new STreeBuffer(global.HISTORY_BLOCK_COUNT * 1000, global.CompareItemHashSimple, "string");
global.HistoryBlockBuf = new global.STreeBuffer(global.HISTORY_BLOCK_COUNT * 1000, global.CompareItemHashSimple, "string");