Review report

core: PR #36002

🟡 Minor

Check every requested txid for pruned-block candidates (src/rpc/txoutproof.cpp:107, head)

When no block hash is supplied and the UTXO scan finds no unspent output, this lookup checks only *setTxids.begin(). If that txid has no index entry, the RPC returns "Transaction not yet in block" without checking whether another requested txid has a pruned-block candidate. Try each requested txid until a lookup identifies a block or reports pruned candidates. Return the generic error only if none does; otherwise, a multi-txid request can hide the hash needed to fetch a missing block.

Preserve pruned candidates when a legacy lookup misses (src/index/txindex.cpp:227, head)

FindTx collects pruned active-chain block hashes before this branch, but returns FindLegacyTx directly whenever the database has legacy entries. If the hashed lookup found only pruned candidates and the legacy lookup misses, FindLegacyTx returns an empty TxMiss, discarding those hashes. Preserve the accumulated candidates on a legacy miss while returning a successful legacy TxFound unchanged, so callers can still identify the block to fetch.