Skip to content

Commit

Permalink
Add debugging : TODO Remove!
Browse files Browse the repository at this point in the history
  • Loading branch information
reductionista committed Sep 25, 2024
1 parent 5ee61dc commit a5df432
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/chains/evm/logpoller/log_poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ func (lp *logPoller) PruneOldBlocks(ctx context.Context) (bool, error) {
// No blocks saved yet.
return true, nil
}
lp.lggr.Errorw("Calling DeleteBlocksBefore")
if latestBlock.FinalizedBlockNumber <= lp.keepFinalizedBlocksDepth {
// No-op, keep all blocks
return true, nil
Expand All @@ -1105,6 +1106,7 @@ func (lp *logPoller) PruneOldBlocks(ctx context.Context) (bool, error) {
latestBlock.FinalizedBlockNumber-lp.keepFinalizedBlocksDepth,
lp.logPrunePageSize,
)
lp.lggr.Errorw("DeleteBlocksBefore returned", "logPrunePageSize", lp.logPrunePageSize, "rowsRemoved", rowsRemoved, "allRemoved", rowsRemoved < lp.logPrunePageSize)
return lp.logPrunePageSize == 0 || rowsRemoved < lp.logPrunePageSize, err
}

Expand Down

0 comments on commit a5df432

Please sign in to comment.