1
0
forked from circlecloud/tera

refactor: replace global new

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-07-13 10:22:28 +08:00
parent 5fd017eaf1
commit efb60e3d0d
7 changed files with 20 additions and 14 deletions

View File

@@ -10,6 +10,7 @@
"use strict";
import CSmartContract from './transaction-validator'
import { RBTree } from './library';
const MAX_MESSAGE_COUNT = 1000;
export default class CMessages extends CSmartContract {
MemPoolMsg
@@ -17,7 +18,7 @@ export default class CMessages extends CSmartContract {
super(SetKeyPair, RunIP, RunPort, UseRNDHeader, bVirtual)
this.MemPoolMsg = []
for (var i = 0; i <= global.MAX_LEVEL_SPECIALIZATION; i++)
this.MemPoolMsg[i] = new global.RBTree(global.CompareItemTimePow)
this.MemPoolMsg[i] = new RBTree(global.CompareItemTimePow)
}
AddMsgToQuote(Msg) {
var Tree = this.MemPoolMsg[Msg.Level];