Skip to content

Commit

Permalink
chore: remove unused SetLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Sep 18, 2024
1 parent 6cff6fe commit f605061
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion internal/consensus/state_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ func (s *StateData) updateToState(state sm.State, commit *types.Commit, blockSto
s.logger.Error("error creating proposer selector", "height", height, "round", 0, "validators", s.Validators, "err", err)
panic(fmt.Sprintf("error creating proposer selector: %v", err))
}
s.ProposerSelector.SetLogger(s.logger)

s.logger.Trace("updating state height", "newHeight", height)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ func (s *heightProposerSelector) UpdateHeightRound(newHeight int64, round int32)
return s.updateScores(newHeight, round)
}

func (s *heightProposerSelector) SetLogger(logger log.Logger) {
s.logger = logger
}

func (s *heightProposerSelector) updateScores(newHeight int64, _round int32) error {
heightDiff := newHeight - s.height
if heightDiff == 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ func (s *heightRoundProposerSelector) proposerFromStore(height int64, round int3
return nil
}

// SetLogger sets the logger for the strategy
func (s *heightRoundProposerSelector) SetLogger(logger log.Logger) {
s.logger = logger
}

// UpdateHeightRound updates the scores of the validators to the given height and round.
func (s *heightRoundProposerSelector) UpdateHeightRound(newHeight int64, newRound int32) error {
s.mtx.Lock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ type ProposerSelector interface {
ValidatorSet() *types.ValidatorSet
// Create deep copy of the strategy and its underlying validator set
Copy() ProposerSelector

// Define logger to use
SetLogger(logger log.Logger)
}

type BlockStore interface {
Expand Down

0 comments on commit f605061

Please sign in to comment.