Skip to content

Commit

Permalink
adjust error and log msg to use 'expected blockhashes' instead of 'la…
Browse files Browse the repository at this point in the history
…st batch messages block hashes' when pruning block hashes from the db
  • Loading branch information
diegoximenes committed May 20, 2024
1 parent 4aebb9e commit faa405c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arbnode/message_pruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ func (m *MessagePruner) prune(ctx context.Context, count arbutil.MessageIndex, g
func (m *MessagePruner) deleteOldMessagesFromDB(ctx context.Context, messageCount arbutil.MessageIndex, delayedMessageCount uint64) error {
prunedKeysRange, err := deleteFromLastPrunedUptoEndKey(ctx, m.transactionStreamer.db, blockHashInputFeedPrefix, &m.cachedPrunedBlockHashesInputFeed, uint64(messageCount))
if err != nil {
return fmt.Errorf("error deleting last batch messages' block hashes: %w", err)
return fmt.Errorf("error deleting expected block hashes: %w", err)
}
if len(prunedKeysRange) > 0 {
log.Info("Pruned last batch messages' block hashes:", "first pruned key", prunedKeysRange[0], "last pruned key", prunedKeysRange[len(prunedKeysRange)-1])
log.Info("Pruned expected block hashes:", "first pruned key", prunedKeysRange[0], "last pruned key", prunedKeysRange[len(prunedKeysRange)-1])
}

prunedKeysRange, err = deleteFromLastPrunedUptoEndKey(ctx, m.transactionStreamer.db, messagePrefix, &m.cachedPrunedMessages, uint64(messageCount))
Expand Down

0 comments on commit faa405c

Please sign in to comment.