mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
ethclient, mobile: improve docs
This commit is contained in:
parent
86128a61ae
commit
c4100f7ede
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
// 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
|
// must be known to the remote node and included in the blockchain at the given block and
|
||||||
// derived by the protocol at the time of inclusion.
|
// 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
|
// There is a fast-path for transactions retrieved by TransactionByHash and
|
||||||
// TransactionInBlock. Getting their sender address can be done without an RPC interaction.
|
// TransactionInBlock. Getting their sender address can be done without an RPC interaction.
|
||||||
|
|
|
||||||
|
|
@ -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
|
// GetTransactionSender returns the sender address of a transaction. The transaction must
|
||||||
// be included in the blockchain.
|
// be included in blockchain at the given block and index.
|
||||||
func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction, hash *Hash, index int) (sender *Address, _ error) {
|
func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction, blockhash *Hash, index int) (sender *Address, _ error) {
|
||||||
addr, err := ec.client.TransactionSender(ctx.context, tx.tx, hash.hash, uint(index))
|
addr, err := ec.client.TransactionSender(ctx.context, tx.tx, blockhash.hash, uint(index))
|
||||||
return &Address{addr}, err
|
return &Address{addr}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue