core: better document reason for dropping error on return (#30811)

Add a comment for error return of nil

Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
pull/30821/head
wangjingcun 2 months ago committed by GitHub
parent 915248cd6b
commit e0deac7f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      core/blockchain_reader.go

@ -277,6 +277,13 @@ func (bc *BlockChain) GetTransactionLookup(hash common.Hash) (*rawdb.LegacyTxLoo
if tx == nil {
progress, err := bc.TxIndexProgress()
if err != nil {
// No error is returned if the transaction indexing progress is unreachable
// due to unexpected internal errors. In such cases, it is impossible to
// determine whether the transaction does not exist or has simply not been
// indexed yet without a progress marker.
//
// In such scenarios, the transaction is treated as unreachable, though
// this is clearly an unintended and unexpected situation.
return nil, nil, nil
}
// The transaction indexing is not finished yet, returning an

Loading…
Cancel
Save