Commit 1ca74aba authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #3505 from bas-vk/txinblock

ethclient: hex encode request args for TransactionInBlock
parents 891fcd8c 8bc545be
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment