diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e51413cc1066..b25473ad797f 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1752,6 +1752,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)