From 8bc545be2ab365753a8894cc88e754a69e6bc796 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Tue, 3 Jan 2017 10:18:17 +0100 Subject: [PATCH] ethclient: hex encode request args for TransactionInBlock --- ethclient/ethclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 4daebda92..81a5ae2c3 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -185,7 +185,7 @@ func (ec *Client) TransactionCount(ctx context.Context, blockHash common.Hash) ( // TransactionInBlock returns a single transaction at index in the given block. func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) { var tx *types.Transaction - err := ec.c.CallContext(ctx, &tx, "eth_getTransactionByBlockHashAndIndex", blockHash, index) + err := ec.c.CallContext(ctx, &tx, "eth_getTransactionByBlockHashAndIndex", blockHash, hexutil.Uint64(index)) if err == nil { if tx == nil { return nil, ethereum.NotFound