From 351b3bf6b0e775fe2a461d212ab2c6f7d166a102 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 17 May 2022 12:24:43 -0400 Subject: [PATCH] tentative change for preventing blocksync early bail out --- 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 a53ff9836..9e81659be 100644 --- a/internal/blocksync/reactor.go +++ b/internal/blocksync/reactor.go @@ -465,7 +465,10 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh switch { // TODO(sergio) Might be needed for implementing the upgrading solution. Remove after that //case state.LastBlockHeight > 0 && r.store.LoadBlockExtCommit(state.LastBlockHeight) == nil: - case state.LastBlockHeight > 0 && blocksSynced == 0: + case state.LastBlockHeight > 0 && + state.ConsensusParams.ABCI.VoteExtensionsEnabled(state.LastBlockHeight) && + // can you switch to consensus if no blocks are sync'd but you already have a ext commit? + blocksSynced == 0: // Having state-synced, we need to blocksync at least one block r.logger.Info( "no seen commit yet",