aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-28 18:40:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-28 18:40:15 +0800
commitba7b384019de17a72a8c24e3aaac8a98ff30dcc5 (patch)
treeb081c59155b4d198cd0fd125753b01b5ffe1b8ea /internal/ethapi
parent98ec5e50115b47670c1f3ffb2cc890ce4838c4d6 (diff)
downloadgo-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar.gz
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar.bz2
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar.lz
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar.xz
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.tar.zst
go-tangerine-ba7b384019de17a72a8c24e3aaac8a98ff30dcc5.zip
internal/ethapi: fix getTransactionReceipt
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/api.go4
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]