use simpler check in blocksync reactor

This commit is contained in:
William Banfield
2022-05-15 23:10:32 -04:00
parent 5f40251796
commit cb0a2ec704
+1 -1
View File
@@ -557,7 +557,7 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
// validate the block before we persist it
err = r.blockExec.ValidateBlock(ctx, state, first)
}
if err == nil && state.ConsensusParams.Vote.RequireExtensions(state.LastBlockHeight+1) {
if err == nil && state.ConsensusParams.Vote.RequireExtensions(extCommit.Height) {
// if vote extensions were required at this height, ensure they exist.
err = extCommit.EnsureExtensions()
}