go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

ethclient: pass BlockNumberOrHash to eth_getBlockReceipts

Open Forostovec opened this issue 1 day ago • 0 comments

Previously BlockReceipts sent blockNrOrHash.String() to eth_getBlockReceipts, which dropped the RequireCanonical flag and could emit the invalid literal "nil" for zero values. This change passes the rpc.BlockNumberOrHash object directly so the server can honor RequireCanonical and fail clearly on invalid input. This aligns with other ethclient methods (e.g., BalanceAtHash, CodeAtHash) and remains compatible with the server, which accepts structured parameters.

Forostovec avatar Dec 10 '25 10:12 Forostovec