From 3fcf0c014093a8abbf22f69cb2b4b962f3bccebc Mon Sep 17 00:00:00 2001 From: William Banfield Date: Fri, 13 May 2022 17:10:12 -0400 Subject: [PATCH] blocksync checks for vote extensions --- internal/blocksync/reactor.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/blocksync/reactor.go b/internal/blocksync/reactor.go index 144595889..53d83eb99 100644 --- a/internal/blocksync/reactor.go +++ b/internal/blocksync/reactor.go @@ -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 {