From cef5525f39ad0ac0f034461c8daa79dfa44805df Mon Sep 17 00:00:00 2001 From: HaoyangLiu Date: Mon, 13 Jul 2020 17:33:24 +0800 Subject: [PATCH] fix bug in load last validator set --- state/execution.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state/execution.go b/state/execution.go index 159b3a99b..4d38d8689 100644 --- a/state/execution.go +++ b/state/execution.go @@ -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 {