aboutsummaryrefslogtreecommitdiffstats
path: root/ethclient
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-04 18:43:27 +0800
committerGitHub <noreply@github.com>2017-01-04 18:43:27 +0800
commit1ca74aba6fa4cf4ca414c942cbf99e211577af03 (patch)
tree907bb88010f5715ea3dc363807e86033136c71e7 /ethclient
parent891fcd8ce133dd118a4ae96b3bb36e700ae7cc0f (diff)
parent8bc545be2ab365753a8894cc88e754a69e6bc796 (diff)
downloaddexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar.gz
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar.bz2
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar.lz
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar.xz
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.tar.zst
dexon-1ca74aba6fa4cf4ca414c942cbf99e211577af03.zip
Merge pull request #3505 from bas-vk/txinblock
ethclient: hex encode request args for TransactionInBlock
Diffstat (limited to 'ethclient')
-rw-r--r--ethclient/ethclient.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go
index 8e26dbeb4..3acaaa0d1 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