From 3bc0fe1ee3183311efe851aca8fd10d5a5433929 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 29 Nov 2016 15:54:06 +0100 Subject: 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. --- mobile/ethclient.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mobile') 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 } -- cgit v1.2.3