mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
Set nil in values return for GetTransactionReceipt errors
This commit is contained in:
parent
e628f04131
commit
a2605686e9
1 changed files with 4 additions and 2 deletions
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue