aboutsummaryrefslogtreecommitdiffstats
path: root/ethclient
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-01-03 17:18:17 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-01-03 21:46:00 +0800
commit8bc545be2ab365753a8894cc88e754a69e6bc796 (patch)
treede84b73a7c5365765455d619a35d6a13c13c48e2 /ethclient
parent3e3edcc46566de81ee3e20d8c016788550a6f4c5 (diff)
downloadgo-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar.gz
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar.bz2
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar.lz
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar.xz
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.tar.zst
go-tangerine-8bc545be2ab365753a8894cc88e754a69e6bc796.zip
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 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