blocksync checks for vote extensions

This commit is contained in:
William Banfield
2022-05-13 17:10:12 -04:00
parent c0bf3307c9
commit 3fcf0c0140

View File

@@ -557,7 +557,10 @@ 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 vote extensions were required at this height, ensure they exist.
err = extCommit.EnsureExtensions()
}
// If either of the checks failed we log the error and request for a new block
// at that height
if err != nil {