ethclient: fix BlockReceipts parameter encoding #28087 (#1382)

Co-authored-by: Andryanau Kanstantsin <andrianov.dev@yandex.by>
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Daniel Liu 2025-08-26 15:13:20 +08:00 committed by GitHub
parent 3fcd30adfe
commit c332874737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,10 +109,10 @@ func (ec *Client) PeerCount(ctx context.Context) (uint64, error) {
return uint64(result), err
}
// BlockReceipts returns the receipts of a given block number or hash
// BlockReceipts returns the receipts of a given block number or hash.
func (ec *Client) BlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]*types.Receipt, error) {
var r []*types.Receipt
err := ec.c.CallContext(ctx, &r, "eth_getBlockReceipts", blockNrOrHash)
err := ec.c.CallContext(ctx, &r, "eth_getBlockReceipts", blockNrOrHash.String())
if err == nil && r == nil {
return nil, ethereum.ErrNotFound
}