mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-29 06:01:21 +00:00
fix validator timeout bug
This commit is contained in:
parent
3f159dab69
commit
03a7564abd
@ -565,7 +565,9 @@ func (s *State) AppendBlock(block *blk.Block, blockPartsHeader blk.PartSetHeader
|
|||||||
// unbond them, they have timed out.
|
// unbond them, they have timed out.
|
||||||
toTimeout := []*Validator{}
|
toTimeout := []*Validator{}
|
||||||
s.BondedValidators.Iterate(func(index uint, val *Validator) bool {
|
s.BondedValidators.Iterate(func(index uint, val *Validator) bool {
|
||||||
if val.LastCommitHeight+validatorTimeoutBlocks < block.Height {
|
lastActivityHeight := MaxUint(val.BondHeight, val.LastCommitHeight)
|
||||||
|
if lastActivityHeight+validatorTimeoutBlocks < block.Height {
|
||||||
|
log.Info("Validator timeout", "validator", val, "height", block.Height)
|
||||||
toTimeout = append(toTimeout, val)
|
toTimeout = append(toTimeout, val)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user