mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Fix "Signer 0x... is not a part of the producer set at block xxxx"
The validator set json loaded from database will have an empty map. This change will recompute the validator map based on validator set.
This commit is contained in:
parent
f184772b4d
commit
c50ff82ab1
2 changed files with 6 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ func loadSnapshot(config *params.BorConfig, sigcache *lru.ARCCache, db ethdb.Dat
|
|||
return nil, err
|
||||
}
|
||||
|
||||
snap.ValidatorSet.UpdateValidatorMap()
|
||||
|
||||
snap.config = config
|
||||
snap.sigcache = sigcache
|
||||
|
||||
|
|
|
|||
|
|
@ -628,6 +628,10 @@ func (vals *ValidatorSet) updateValidators(updates []*Validator, deletes []*Vali
|
|||
vals.applyUpdates(updates)
|
||||
vals.applyRemovals(deletes)
|
||||
|
||||
vals.UpdateValidatorMap()
|
||||
}
|
||||
|
||||
func (vals *ValidatorSet) UpdateValidatorMap() {
|
||||
vals.validatorsMap = make(map[common.Address]int, len(vals.Validators))
|
||||
|
||||
for i, val := range vals.Validators {
|
||||
|
|
|
|||
Loading…
Reference in a new issue