From 79469af2e6cc60a1445d600ec9c49a07ae9c4f67 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 16 Sep 2021 19:56:08 -0400 Subject: [PATCH] comment out broken function --- internal/consensus/state.go | 8 +++----- internal/consensus/state_test.go | 14 ++++++-------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index e42a9b25e..38e2d5c51 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -1455,11 +1455,9 @@ func (cs *State) enterPrecommit(height int64, round int32) { // The +2/3 prevotes for this round is the POL for our unlock. logger.Debug("precommit step; +2/3 prevotes for a block we do not have; voting nil", "block_id", blockID) - /* - cs.LockedRound = -1 - cs.LockedBlock = nil - cs.LockedBlockParts = nil - */ + // cs.LockedRound = -1 + // cs.LockedBlock = nil + // cs.LockedBlockParts = nil if !cs.ProposalBlockParts.HasHeader(blockID.PartSetHeader) { cs.ProposalBlock = nil diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index 8c164b869..c4c698a4d 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -707,6 +707,7 @@ func TestStateLockPOLRelock(t *testing.T) { } // 4 vals, one precommits, other 3 polka at next round, so we unlock and precomit the polka +/* func TestStateLockPOLUnlock(t *testing.T) { config := configSetup(t) @@ -727,10 +728,8 @@ func TestStateLockPOLUnlock(t *testing.T) { // everything done from perspective of cs1 - /* - Round1 (cs1, B) // B B B B // B nil B nil - eg. didn't see the 2/3 prevotes - */ +// Round1 (cs1, B) // B B B B // B nil B nil +// eg. didn't see the 2/3 prevotes // start round and wait for propose and prevote startTestRound(cs1, height, round) @@ -768,10 +767,8 @@ func TestStateLockPOLUnlock(t *testing.T) { ensureNewRound(newRoundCh, height, round) t.Log("#### ONTO ROUND 1") - /* - Round2 (vs2, C) // B nil nil nil // nil nil nil _ - cs1 unlocks! - */ +// Round2 (vs2, C) // B nil nil nil // nil nil nil _ +// cs1 unlocks! //XXX: this isnt guaranteed to get there before the timeoutPropose ... if err := cs1.SetProposalAndBlock(prop, propBlock, propBlockParts, "some peer"); err != nil { t.Fatal(err) @@ -796,6 +793,7 @@ func TestStateLockPOLUnlock(t *testing.T) { signAddVotes(config, cs1, tmproto.PrecommitType, nil, types.PartSetHeader{}, vs2, vs3) ensureNewRound(newRoundCh, height, round+1) } +*/ // 4 vals, one precommits, other 3 polka on nil at next round. We maintain the locked block but precommit nil func TestStatePOLDoesNotUnlock(t *testing.T) {