ethclient: fix BlockReceipts parameter encoding (#28087)

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Andryanau Kanstantsin 2023-09-25 23:24:20 +02:00 committed by devopsbo3
parent 877c5be6fe
commit 2e3ba718e3

View file

@ -108,10 +108,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.NotFound
}