diff options
author | StephenButtolph <[email protected]> | 2020-08-12 21:49:21 -0400 |
---|---|---|
committer | StephenButtolph <[email protected]> | 2020-08-12 21:49:21 -0400 |
commit | 89df16782ed7a6b45600f3685371b8574b12f1ff (patch) | |
tree | 0d1771048b2ebf656ff1cfff42dd612f6f470027 /plugin | |
parent | cffa0954bbdb43821d1b71d00f99fb705cecd25b (diff) |
increased cache sizesv0.2.8-rc.1
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/evm/vm.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index c710b9d..c22d9d1 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -53,6 +53,7 @@ const ( minBlockTime = 250 * time.Millisecond maxBlockTime = 1000 * time.Millisecond batchSize = 250 + cacheSize = 1 << 15 // 32768 ) const ( @@ -183,8 +184,8 @@ func (vm *VM) Initialize( chain.SetOnQueryAcceptedBlock(func() *types.Block { return vm.getLastAccepted().ethBlock }) - vm.blockCache = cache.LRU{Size: 2048} - vm.blockStatusCache = cache.LRU{Size: 1024} + vm.blockCache = cache.LRU{Size: cacheSize} + vm.blockStatusCache = cache.LRU{Size: cacheSize} vm.newBlockChan = make(chan *Block) vm.networkChan = toEngine vm.blockDelayTimer = timer.NewTimer(func() { |