From c4100f7edea7a5e2d88d0babc5a1477b1b8dece9 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 27 Sep 2017 12:45:38 +0200 Subject: [PATCH] ethclient, mobile: improve docs --- ethclient/ethclient.go | 4 ++-- mobile/ethclient.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 0fc55300fe..7f73ab113c 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -194,8 +194,8 @@ func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx * } // TransactionSender returns the sender address of the given transaction. The transaction -// must be known to the remote node and included in the blockchain. The sender is the one -// derived by the protocol at the time of inclusion. +// must be known to the remote node and included in the blockchain at the given block and +// index. The sender is the one derived by the protocol at the time of inclusion. // // There is a fast-path for transactions retrieved by TransactionByHash and // TransactionInBlock. Getting their sender address can be done without an RPC interaction. diff --git a/mobile/ethclient.go b/mobile/ethclient.go index 09ae3e42b9..7f31a89989 100644 --- a/mobile/ethclient.go +++ b/mobile/ethclient.go @@ -78,9 +78,9 @@ func (ec *EthereumClient) GetTransactionByHash(ctx *Context, hash *Hash) (tx *Tr } // GetTransactionSender returns the sender address of a transaction. The transaction must -// be included in the blockchain. -func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction, hash *Hash, index int) (sender *Address, _ error) { - addr, err := ec.client.TransactionSender(ctx.context, tx.tx, hash.hash, uint(index)) +// be included in blockchain at the given block and index. +func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction, blockhash *Hash, index int) (sender *Address, _ error) { + addr, err := ec.client.TransactionSender(ctx.context, tx.tx, blockhash.hash, uint(index)) return &Address{addr}, err }