good morning!!!!

Skip to content
Snippets Groups Projects
Commit e9971d35 authored by rhaps107's avatar rhaps107 Committed by Felix Lange
Browse files

internal/ethapi: don't crash for missing receipts

Fixes #15408
Fixes #14432
parent 5129ef22
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment