From 83d85982a6a32eb0cf94bc71566dabf6e5748640 Mon Sep 17 00:00:00 2001 From: wizeguyy Date: Tue, 1 Oct 2024 15:15:31 -0500 Subject: [PATCH] getTransactionByHash should return null if not found --- internal/quaiapi/api.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/quaiapi/api.go b/internal/quaiapi/api.go index 6637d6c59d..fc31cb12f1 100644 --- a/internal/quaiapi/api.go +++ b/internal/quaiapi/api.go @@ -1373,10 +1373,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, addr // GetTransactionByHash returns the transaction for the given hash func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) { // Try to return an already finalized transaction - tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash) - if err != nil { - return nil, err - } + tx, blockHash, blockNumber, index, _ := s.b.GetTransaction(ctx, hash) if tx != nil { header, err := s.b.HeaderByHash(ctx, blockHash) if err != nil {