diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-02-28 19:40:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 19:40:17 +0800 |
commit | 7843192c8e18d1d7d559a19c2234a8563e5670f5 (patch) | |
tree | acf882fe539cae0bf386a533b9e8ce374a67f8b3 | |
parent | 8f43c9743311eed24fbb2ab011f33ccf3b8aa216 (diff) | |
parent | ba7b384019de17a72a8c24e3aaac8a98ff30dcc5 (diff) | |
download | go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar.gz go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar.bz2 go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar.lz go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar.xz go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.tar.zst go-tangerine-7843192c8e18d1d7d559a19c2234a8563e5670f5.zip |
Merge pull request #16217 from karalabe/rpc-receipt-fetch-fix
internal/ethapi: fix getTransactionReceipt
-rw-r--r-- | internal/ethapi/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index d021b127c..20a060e72 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1035,14 +1035,14 @@ func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) { tx, blockHash, blockNumber, index := core.GetTransaction(s.b.ChainDb(), hash) if tx == nil { - return nil, errors.New("unknown transaction") + return nil, nil } receipts, err := s.b.GetReceipts(ctx, blockHash) if err != nil { return nil, err } if len(receipts) <= int(index) { - return nil, errors.New("unknown receipt") + return nil, nil } receipt := receipts[index] |