aboutsummaryrefslogtreecommitdiffstats
path: root/mobile
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-11-29 22:54:06 +0800
committerFelix Lange <fjl@twurst.com>2016-12-05 17:57:11 +0800
commit3bc0fe1ee3183311efe851aca8fd10d5a5433929 (patch)
treeed6e33c3af93115e02e508f86b993a6bf64f5328 /mobile
parentfa0cc274009670209fd71b1462dcdde3b431d64f (diff)
downloadgo-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar
go-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.gz
go-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.bz2
go-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.lz
go-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.xz
go-tangerine-3bc0fe1ee3183311efe851aca8fd10d5a5433929.tar.zst
go-tangerine-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')
-rw-r--r--mobile/ethclient.go3
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
}