Skip to content

Commit

Permalink
remove redundant logs
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Aug 30, 2024
1 parent 1475fbd commit 50d82e9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions block/pruning.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

func (m *Manager) PruneBlocks(retainHeight uint64) error {
if m.IsProposer() && m.NextHeightToSubmit() < retainHeight { // do not delete anything that we might submit in future
m.logger.Error("skipping block pruning. next height to submit is previous to retain_height.", "retain_height", retainHeight, "next_submit_height", m.NextHeightToSubmit())
return fmt.Errorf("skipping block pruning. next height to submit is previous to retain_height.t %d: next height to submit: %d: %w",
retainHeight,
m.NextHeightToSubmit(),
Expand All @@ -24,7 +23,6 @@ func (m *Manager) PruneBlocks(retainHeight uint64) error {

pruned, err := m.Store.PruneBlocks(m.State.BaseHeight, retainHeight)
if err != nil {
m.logger.Error("pruning dymint store", "retain_height", retainHeight, "err", err)
return fmt.Errorf("pruning dymint store: %w", err)
}

Expand All @@ -33,8 +31,7 @@ func (m *Manager) PruneBlocks(retainHeight uint64) error {
m.State.BaseHeight = retainHeight
_, err = m.Store.SaveState(m.State, nil)
if err != nil {
m.logger.Error("saving state.", "retain_height", retainHeight, "err", err)
return fmt.Errorf("save state: %w", err)
return fmt.Errorf("saving state: %w", err)
}

m.logger.Info("pruned blocks", "pruned", pruned, "retain_height", retainHeight)
Expand Down

0 comments on commit 50d82e9

Please sign in to comment.