From e64daf6d833f33699ac85f078cd280bfacf9338c Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 13 Sep 2024 14:12:07 -0500 Subject: [PATCH] Don't prune the last delayed message --- arbnode/message_pruner.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arbnode/message_pruner.go b/arbnode/message_pruner.go index e1bc72632b..b249bd886c 100644 --- a/arbnode/message_pruner.go +++ b/arbnode/message_pruner.go @@ -112,6 +112,10 @@ func (m *MessagePruner) prune(ctx context.Context, count arbutil.MessageIndex, g } msgCount := endBatchMetadata.MessageCount delayedCount := endBatchMetadata.DelayedMessageCount + if delayedCount > 0 { + // keep an extra delayed message for the inbox reader to use + delayedCount-- + } return m.deleteOldMessagesFromDB(ctx, msgCount, delayedCount) }