abci++: add consensus parameter to control vote extension require height

This commit is contained in:
William Banfield
2022-05-15 23:22:34 -04:00
parent b0fe38c245
commit f1db90affe
19 changed files with 685 additions and 154 deletions
+4 -1
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(extCommit.Height) {
// 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 {