mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
fix vote/unvote in checkpoint issue
This commit is contained in:
parent
d8ac726f30
commit
1c1b833815
1 changed files with 2 additions and 2 deletions
|
|
@ -859,8 +859,6 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state
|
||||||
number := header.Number.Uint64()
|
number := header.Number.Uint64()
|
||||||
rCheckpoint := chain.Config().Posv.RewardCheckpoint
|
rCheckpoint := chain.Config().Posv.RewardCheckpoint
|
||||||
|
|
||||||
_ = c.cacheData(txs, receipts)
|
|
||||||
|
|
||||||
if c.HookReward != nil && number%rCheckpoint == 0 {
|
if c.HookReward != nil && number%rCheckpoint == 0 {
|
||||||
if !c.EnableCache && int(c.BlockSigners.Len()) >= int(rCheckpoint*3) {
|
if !c.EnableCache && int(c.BlockSigners.Len()) >= int(rCheckpoint*3) {
|
||||||
log.Debug("EnableCache true c.BlockSigners.Len() ", "BlockSigners.Len", c.BlockSigners.Len())
|
log.Debug("EnableCache true c.BlockSigners.Len() ", "BlockSigners.Len", c.BlockSigners.Len())
|
||||||
|
|
@ -882,6 +880,8 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ = c.cacheData(txs, receipts)
|
||||||
|
|
||||||
// the state remains as is and uncles are dropped
|
// the state remains as is and uncles are dropped
|
||||||
header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number))
|
header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number))
|
||||||
header.UncleHash = types.CalcUncleHash(nil)
|
header.UncleHash = types.CalcUncleHash(nil)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue