From d2c150df723b34331c805e34583d6aa8db638066 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 23 Nov 2022 14:29:30 -0500 Subject: [PATCH] remove catchup logic temporarily --- consensus/reactor.go | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index f19812f78..d5502bafe 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -756,28 +756,30 @@ OUTER_LOOP: } } - // Special catchup logic. - // If peer is lagging by height 1, send LastCommit. - if prs.Height != 0 && rs.Height == prs.Height+1 { - if ps.PickSendVote(rs.LastCommit) { - logger.Debug("Picked rs.LastCommit to send", "height", prs.Height) - continue OUTER_LOOP - } - } - - // Catchup logic - // If peer is lagging by more than 1, send Commit. - blockStoreBase := conR.conS.blockStore.Base() - if blockStoreBase > 0 && prs.Height != 0 && rs.Height >= prs.Height+2 && prs.Height >= blockStoreBase { - // Load the block commit for prs.Height, - // which contains precommit signatures for prs.Height. - if commit := conR.conS.blockStore.LoadBlockCommit(prs.Height); commit != nil { - if ps.PickSendVote(commit) { - logger.Debug("Picked Catchup commit to send", "height", prs.Height) + /* + // Special catchup logic. + // If peer is lagging by height 1, send LastCommit. + if prs.Height != 0 && rs.Height == prs.Height+1 { + if ps.PickSendVote(rs.LastCommit) { + logger.Debug("Picked rs.LastCommit to send", "height", prs.Height) continue OUTER_LOOP } } - } + + // Catchup logic + // If peer is lagging by more than 1, send Commit. + blockStoreBase := conR.conS.blockStore.Base() + if blockStoreBase > 0 && prs.Height != 0 && rs.Height >= prs.Height+2 && prs.Height >= blockStoreBase { + // Load the block commit for prs.Height, + // which contains precommit signatures for prs.Height. + if commit := conR.conS.blockStore.LoadBlockCommit(prs.Height); commit != nil { + if ps.PickSendVote(commit) { + logger.Debug("Picked Catchup commit to send", "height", prs.Height) + continue OUTER_LOOP + } + } + } + */ if sleeping == 0 { // We sent nothing. Sleep...