Skip to content

Commit 6c51eb4

Browse files
add recursion comment
1 parent 73e7b81 commit 6c51eb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/ethapi/transaction_args.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, header *types.Header
247247

248248
// Arbitrum: update the gas cap to ignore L1 costs so that it's compute-only
249249
if core.InterceptRPCGasCap != nil && state != nil {
250+
// ToMessage recurses once to allow ArbOS to intercept the result for all callers
251+
// ArbOS uses this to modify globalGasCap so that the cap will ignore this tx's specific L1 data costs
250252
core.InterceptRPCGasCap(&globalGasCap, msg, header, state)
251-
return args.ToMessage(globalGasCap, header, nil)
253+
return args.ToMessage(globalGasCap, header, nil) // we pass a nil to avoid another recursion
252254
}
253255
return msg, nil
254256
}

0 commit comments

Comments
 (0)