From 46ddd690975d37fcbff0bd156876cd7c18add284 Mon Sep 17 00:00:00 2001 From: Aman Sanghi Date: Tue, 14 May 2024 21:17:28 +0530 Subject: [PATCH] Changes based on PR comments --- arbnode/inbox_tracker.go | 2 +- system_tests/snap_sync_test.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arbnode/inbox_tracker.go b/arbnode/inbox_tracker.go index bcdf95bb6c..1aa0ff7687 100644 --- a/arbnode/inbox_tracker.go +++ b/arbnode/inbox_tracker.go @@ -684,7 +684,7 @@ func (t *InboxTracker) AddSequencerBatches(ctx context.Context, client arbutil.L return errors.New("previous batch accumulator mismatch") } - if batch.AfterDelayedCount > 0 && !t.snapSyncConfig.Enabled { + if batch.AfterDelayedCount > 0 { haveDelayedAcc, err := t.GetDelayedAcc(batch.AfterDelayedCount - 1) if errors.Is(err, AccumulatorNotFoundErr) { // We somehow missed a referenced delayed message; go back and look for it diff --git a/system_tests/snap_sync_test.go b/system_tests/snap_sync_test.go index 9497ad01b3..a5f84b1982 100644 --- a/system_tests/snap_sync_test.go +++ b/system_tests/snap_sync_test.go @@ -68,8 +68,6 @@ func TestSnapSync(t *testing.T) { batchCount, err := builder.L2.ConsensusNode.InboxTracker.GetBatchCount() Require(t, err) - delayedCount, err := builder.L2.ConsensusNode.InboxTracker.GetDelayedCount() - Require(t, err) // Last batch is batchCount - 1, so prev batch is batchCount - 2 prevBatchMetaData, err := builder.L2.ConsensusNode.InboxTracker.GetBatchMetadata(batchCount - 2) Require(t, err) @@ -79,7 +77,7 @@ func TestSnapSync(t *testing.T) { nodeConfig := builder.nodeConfig nodeConfig.SnapSyncTest.Enabled = true nodeConfig.SnapSyncTest.BatchCount = batchCount - nodeConfig.SnapSyncTest.DelayedCount = delayedCount + nodeConfig.SnapSyncTest.DelayedCount = prevBatchMetaData.DelayedMessageCount - 1 nodeConfig.SnapSyncTest.PrevDelayedRead = prevMessage.DelayedMessagesRead nodeConfig.SnapSyncTest.PrevBatchMessageCount = uint64(prevBatchMetaData.MessageCount) // Cleanup the message data of 2nd node, but keep the block state data.