Skip to content

Conversation

@Bashmunta
Copy link
Contributor

Added a zero-batch guard to arbnode/inbox_tracker.go in InboxTracker.FindInboxBatchContainingMessage() to return (0, false, nil) when GetBatchCount() is zero, preventing an underflow from batchCount - 1 and aligning with the function’s contract and caller expectations that “not found yet” is not an error. It also updates staker/block_validator.go to avoid subtracting one from a zero batch count when reading the last batch’s message count, eliminating unnecessary database calls and log noise in the empty state. The behavior for non-empty batch counts remains unchanged.

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2025

CLA assistant check
All committers have signed the CLA.

@gligneul gligneul assigned joshuacolvin0 and unassigned gligneul Nov 26, 2025
@joshuacolvin0 joshuacolvin0 added this pull request to the merge queue Dec 2, 2025
Merged via the queue into OffchainLabs:master with commit 8a65e48 Dec 2, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants