@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user