From 88930545736498ce71417dee6d1143af4a8c20cb Mon Sep 17 00:00:00 2001 From: Sergio Mena Date: Sun, 12 Jan 2025 16:57:52 +0100 Subject: [PATCH] Appease linter part II --- internal/consensus/common_test.go | 1 - internal/consensus/reactor.go | 1 - internal/consensus/replay_test.go | 1 - internal/consensus/types/round_state.go | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 0bfa2a9043..0bef8110ed 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -333,7 +333,6 @@ func validateLastPrecommit(t *testing.T, cs *State, privVal *validatorStub, bloc address := pv.Address() var vote *types.Vote if vs, ok := votes.(*types.VoteSet); ok { - if vote = vs.GetByAddress(address); vote == nil { panic("Failed to find precommit from validator") } diff --git a/internal/consensus/reactor.go b/internal/consensus/reactor.go index 393c3d4400..c6a6569a3d 100644 --- a/internal/consensus/reactor.go +++ b/internal/consensus/reactor.go @@ -694,7 +694,6 @@ OUTER_LOOP: } else { if c := getEntireCommitToSend(logger, conR.conS, rs, ps, prs); c != nil { if commit, ok := (c).(*types.Commit); ok { - if ps.sendCommit(commit) { continue OUTER_LOOP } diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 48e75c7dd0..0fa732eae2 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -30,7 +30,6 @@ import ( mempl "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/proxy" - sm "github.com/cometbft/cometbft/state" smmocks "github.com/cometbft/cometbft/state/mocks" "github.com/cometbft/cometbft/types" diff --git a/internal/consensus/types/round_state.go b/internal/consensus/types/round_state.go index 341c8f2b81..95884528b9 100644 --- a/internal/consensus/types/round_state.go +++ b/internal/consensus/types/round_state.go @@ -98,7 +98,7 @@ type RoundState struct { ValidBlockParts *types.PartSet `json:"valid_block_parts"` Votes *HeightVoteSet `json:"votes"` CommitRound int32 `json:"commit_round"` // - LastCommit types.VoteSetReader `json:"last_commit"` // Last precommits at Height-1 TODO We need to check that this is not breaking json marshalling + LastCommit types.VoteSetReader `json:"last_commit"` // Last precommits at Height-1 LastValidators *types.ValidatorSet `json:"last_validators"` TriggeredTimeoutPrecommit bool `json:"triggered_timeout_precommit"` }