Skip to content

Commit

Permalink
Changes based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amsanghi committed May 14, 2024
1 parent 551e509 commit 46ddd69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arbnode/inbox_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions system_tests/snap_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down

0 comments on commit 46ddd69

Please sign in to comment.