Revert "internal: early exit if tx for getTxReceipt not found (#27712)"

This reverts commit d927c53a0d.
This commit is contained in:
devopsbo3 2023-11-10 12:27:53 -06:00 committed by GitHub
parent 995745159c
commit 9c0ea1c2f9

View file

@ -1681,7 +1681,7 @@ func (s *TransactionAPI) GetRawTransactionByHash(ctx context.Context, hash commo
// GetTransactionReceipt returns the transaction receipt for the given transaction hash. // GetTransactionReceipt returns the transaction receipt for the given transaction hash.
func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) { func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) {
tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash) tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash)
if tx == nil || err != nil { if err != nil {
// When the transaction doesn't exist, the RPC method should return JSON null // When the transaction doesn't exist, the RPC method should return JSON null
// as per specification. // as per specification.
return nil, nil return nil, nil