aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ethapi/api.go')
-rw-r--r--internal/ethapi/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index fe0ed8170..76a7306e4 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -1003,9 +1003,12 @@ func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context,
func (s *PublicTransactionPoolAPI) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) {
tx, blockHash, blockNumber, index := core.GetTransaction(s.b.ChainDb(), hash)
if tx == nil {
- return nil, nil
+ return nil, errors.New("unknown transaction")
}
receipt, _, _, _ := core.GetReceipt(s.b.ChainDb(), hash) // Old receipts don't have the lookup data available
+ if receipt == nil {
+ return nil, errors.New("unknown receipt")
+ }
var signer types.Signer = types.FrontierSigner{}
if tx.Protected() {