ethclient: hex encode request args for TransactionInBlock

This commit is contained in:
Bas van Kervel 2017-01-03 10:18:17 +01:00
parent 3e3edcc465
commit 8bc545be2a
No known key found for this signature in database
GPG Key ID: BFB23B252EF5812B
1 changed files with 1 additions and 1 deletions

View File

@ -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