Browse Source

consensus: fix wrong proposer schedule for `InitChain` validators (#5329)

Fixes #5328.
pull/5330/head
Erik Grinaker 4 years ago
committed by GitHub
parent
commit
63ea4f1d26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      CHANGELOG_PENDING.md
  2. +1
    -1
      consensus/replay.go

+ 2
- 0
CHANGELOG_PENDING.md View File

@ -46,4 +46,6 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
- [statesync] \#5320 Broadcast snapshot request to all pre-connected peers on start (@erikgrinaker)
- [consensus] \#5329 Fix wrong proposer schedule for validators returned by `InitChain` (@erikgrinaker)
- [light] [\#5307](https://github.com/tendermint/tendermint/pull/5307) Persist correct proposer priority in light client validator sets (@cmwaters)

+ 1
- 1
consensus/replay.go View File

@ -339,7 +339,7 @@ func (h *Handshaker) ReplayBlocks(
return nil, err
}
state.Validators = types.NewValidatorSet(vals)
state.NextValidators = types.NewValidatorSet(vals)
state.NextValidators = types.NewValidatorSet(vals).CopyIncrementProposerPriority(1)
} else if len(h.genDoc.Validators) == 0 {
// If validator set is not set in genesis and still empty after InitChain, exit.
return nil, fmt.Errorf("validator set is nil in genesis and still empty after InitChain")


Loading…
Cancel
Save