diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-29 22:54:06 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-12-05 17:57:11 +0800 |
commit | 3bc0fe1ee3183311efe851aca8fd10d5a5433929 (patch) | |
tree | ed6e33c3af93115e02e508f86b993a6bf64f5328 /mobile/ethclient.go | |
parent | fa0cc274009670209fd71b1462dcdde3b431d64f (diff) | |
download | dexon-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.gz dexon-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.zst dexon-3bc0fe1ee3183311efe851aca8fd10d5a5433929.zip |
ethclient, ethereum: add NotFound, split transactions out of ChainReader
ethclient now returns ethereum.NotFound if the server returns null and
no error while accessing blockchain data.
The light client cannot provide arbitrary transactions. The change to
split transaction access into its own interface emphasizes that
transactions should not be relied on and recommends use of logs.
Diffstat (limited to 'mobile/ethclient.go')
-rw-r--r-- | mobile/ethclient.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile/ethclient.go b/mobile/ethclient.go index 668d65e32..a60fc2fa5 100644 --- a/mobile/ethclient.go +++ b/mobile/ethclient.go @@ -73,7 +73,8 @@ func (ec *EthereumClient) GetHeaderByNumber(ctx *Context, number int64) (*Header // GetTransactionByHash returns the transaction with the given hash. func (ec *EthereumClient) GetTransactionByHash(ctx *Context, hash *Hash) (*Transaction, error) { - tx, err := ec.client.TransactionByHash(ctx.context, hash.hash) + // TODO(karalabe): handle isPending + tx, _, err := ec.client.TransactionByHash(ctx.context, hash.hash) return &Transaction{tx}, err } |