Skip to content

Commit

Permalink
internal/ethapi: add comment explaining return of nil instead of error (
Browse files Browse the repository at this point in the history
ethereum#25097)


Co-authored-by: Felix Lange <fjl@twurst.com>
  • Loading branch information
2 people authored and blakehhuynh committed Oct 3, 2022
1 parent a4f60bd commit ddc083d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/ethapi/api.go
Expand Up @@ -1581,6 +1581,8 @@ 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, err := s.b.GetTransaction(ctx, hash)
if err != nil {
// When the transaction doesn't exist, the RPC method should return JSON null
// as per specification.
return nil, nil
}
receipts, err := s.b.GetReceipts(ctx, blockHash)
Expand Down

0 comments on commit ddc083d

Please sign in to comment.