mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 21:04:11 +00:00
fix clique_sealer: reset block header coinbase
if we are not voting, coinbase should be filled with zero because other subsystem e.g txpool can produce block header with non zero coinbase. if that coinbase is one of the signer and the nonce is zero, that signer will be vote out from signer list
This commit is contained in:
parent
af10e8f179
commit
3f0994f80b
@ -180,6 +180,13 @@ proc prepare*(c: Clique; parent: BlockHeader, header: var BlockHeader): CliqueOk
|
||||
if rc.isErr:
|
||||
return err(rc.error)
|
||||
|
||||
# if we are not voting, coinbase should be filled with zero
|
||||
# because other subsystem e.g txpool can produce block header
|
||||
# with non zero coinbase. if that coinbase is one of the signer
|
||||
# and the nonce is zero, that signer will be vote out from
|
||||
# signer list
|
||||
header.coinbase.reset
|
||||
|
||||
if (header.blockNumber mod c.cfg.epoch) != 0:
|
||||
c.doExclusively:
|
||||
# Gather all the proposals that make sense voting on
|
||||
|
Loading…
x
Reference in New Issue
Block a user