mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
improve cache size
This commit is contained in:
parent
885babf92d
commit
2ed47cf48e
1 changed files with 5 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
inmemorySnapshots = 128 // Number of recent vote snapshots to keep in memory
|
inmemorySnapshots = 128 // Number of recent vote snapshots to keep in memory
|
||||||
blockSignersCacheLimit = 3600
|
blockSignersCacheLimit = 36000
|
||||||
votingCacheLimit = 1500000
|
votingCacheLimit = 1500000
|
||||||
M2ByteLength = 4
|
M2ByteLength = 4
|
||||||
)
|
)
|
||||||
|
|
@ -889,10 +889,10 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.HookReward != nil && number%rCheckpoint == 0 {
|
if c.HookReward != nil && number%rCheckpoint == 0 {
|
||||||
if !c.EnableCache && c.BlockSigners.Len() >= 2700 {
|
if !c.EnableCache && c.BlockSigners.Len() >= 2700 {
|
||||||
fmt.Println("EnableCache true c.BlockSigners.Len()", c.BlockSigners.Len())
|
fmt.Println("EnableCache true c.BlockSigners.Len()", c.BlockSigners.Len())
|
||||||
c.EnableCache = true
|
c.EnableCache = true
|
||||||
}
|
}
|
||||||
|
|
||||||
err, rewards := c.HookReward(chain, state, header)
|
err, rewards := c.HookReward(chain, state, header)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue