Utility function to find any unspent output with a given txid. This function can be quite expensive because in the event of a transaction which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK lookups to database, so it should be used with care.
Synopsis
Declared in <coins.h>
Coin const&
AccessByTxid(
CCoinsViewCache const& cache,
Txid const& txid);
Return Value
Reference to the first unspent output found, or an empty coin if none exists.
Parameters
Name |
Description |
cache |
Cache to search for an unspent output. |
txid |
Transaction ID to find an unspent output for. |
Created with MrDocs