From 01ca403e0e694bc481d2e7427ee86efefe19ad23 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Fri, 20 May 2022 11:26:05 -0400 Subject: [PATCH] use first.Height to avoid nil panic --- internal/blocksync/reactor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/blocksync/reactor.go b/internal/blocksync/reactor.go index f1a1333e8..37f3afc8d 100644 --- a/internal/blocksync/reactor.go +++ b/internal/blocksync/reactor.go @@ -587,7 +587,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.ABCI.VoteExtensionsEnabled(extCommit.Height) { + if err == nil && state.ConsensusParams.ABCI.VoteExtensionsEnabled(first.Height) { // if vote extensions were required at this height, ensure they exist. err = extCommit.EnsureExtensions() } else if err == nil && !state.ConsensusParams.ABCI.VoteExtensionsEnabled(extCommit.Height) {