go-ethereum/internal/web3ext
YQ AltLayer 81a6b08f3c eth: make txIndex optional in debug_storageRangeAt
The debug_storageRangeAt RPC method requires txIndex as a mandatory
parameter, meaning callers can only query state before a specific
transaction in a block. There is no way to query the post-block state
(after the last transaction), unlike other debug methods such as
debug_traceCall which allow omitting the index.

Make txIndex a pointer (*int) so it becomes optional:
- When provided: use stateAtTransaction to get state before that tx
  (existing behavior, unchanged)
- When omitted (null): use stateAtBlock to get the post-block state

This is consistent with how other debug API endpoints handle optional
state references.

Fixes #31344
2026-03-01 13:04:41 +00:00
..
web3ext.go eth: make txIndex optional in debug_storageRangeAt 2026-03-01 13:04:41 +00:00