Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #141 from binance-chain/fix-lastValSet
Browse files Browse the repository at this point in the history
R4R: fix bug in load last validator set
  • Loading branch information
unclezoro authored Jul 13, 2020
2 parents 2f1f700 + cef5525 commit 5613ebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions state/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ func getBeginBlockValidatorInfo(block *types.Block, state *State, stateDB dbm.DB
var lastValSet *types.ValidatorSet
var err error
if block.Height > 1 {
// for state sync, validator set can't be load from db and it should be equal to the validator set in state
// for state sync, validator set can't be load from db and it should be equal to the last validator set in state
if block.Height == state.LastBlockHeight + 1 {
lastValSet = state.Validators
lastValSet = state.LastValidators
} else {
lastValSet, err = LoadValidators(stateDB, block.Height-1)
if err != nil {
Expand Down

0 comments on commit 5613ebd

Please sign in to comment.