@@ -13,6 +13,7 @@ import * as fs from 'fs'
|
||||
import CRest from './rest-loader'
|
||||
import { TYPE_TRANSACTION } from '../constant/account';
|
||||
import { STreeBuffer } from './base';
|
||||
import { RBTree } from './library';
|
||||
//import * as crypto from 'crypto';
|
||||
require('./block-loader-const');
|
||||
const STAT_BLOCK_LOAD_PERIOD = global.CONSENSUS_PERIOD_TIME / 5;
|
||||
@@ -1197,7 +1198,7 @@ export default class CBlock extends CRest {
|
||||
GetHistoryTree(typedata) {
|
||||
var Tree = global.HistoryBlockBuf.LoadValue(typedata, 1);
|
||||
if (!Tree) {
|
||||
Tree = new global.RBTree(global.CompareItemHash)
|
||||
Tree = new RBTree(global.CompareItemHash)
|
||||
global.HistoryBlockBuf.SaveValue(typedata, Tree)
|
||||
}
|
||||
return Tree;
|
||||
|
||||
Reference in New Issue
Block a user