Skip to content

Commit

Permalink
Set nil in values return for GetTransactionReceipt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yograterol committed Dec 31, 2017
1 parent e628f04 commit a260568
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,13 @@ 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, errors.New("unknown transaction")
//return nil, errors.New("unknown transaction")
return nil, nil
}
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")
// return nil, errors.New("unknown receipt")
return nil, nil
}

var signer types.Signer = types.FrontierSigner{}
Expand Down

0 comments on commit a260568

Please sign in to comment.