go-ethereum
go-ethereum copied to clipboard
ethclient: pass BlockNumberOrHash to eth_getBlockReceipts
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.