diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 4aa37a8dc4c39..24d9b58567b99 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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)