Skip to content

Commit

Permalink
Fix off-by-one error in delay proof
Browse files Browse the repository at this point in the history
  • Loading branch information
gligneul committed Oct 23, 2024
1 parent b6b5d6b commit d83a5f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arbnode/delay_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ func GetDelayBufferConfig(ctx context.Context, sequencerInbox *bridgegen.Sequenc
func GenDelayProof(ctx context.Context, message *arbostypes.MessageWithMetadata, inbox *InboxTracker) (
*bridgegen.DelayProof, error) {

seqNum := message.DelayedMessagesRead
if message.DelayedMessagesRead == 0 {
return nil, fmt.Errorf("BUG: trying to generate delay proof without delayed message")
}
seqNum := message.DelayedMessagesRead - 1
var beforeDelayedAcc common.Hash
if seqNum > 0 {
var err error
Expand Down

0 comments on commit d83a5f2

Please sign in to comment.