Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | |||||
void UnloadBlockIndex(CTxMemPool *mempool); | void UnloadBlockIndex(CTxMemPool *mempool); | ||||
/** | /** | ||||
* Run an instance of the script checking thread. | * Run an instance of the script checking thread. | ||||
*/ | */ | ||||
void ThreadScriptCheck(int worker_num); | void ThreadScriptCheck(int worker_num); | ||||
/** | /** | ||||
* Retrieve a transaction (from memory pool, or from disk, if possible). | * Return transaction from the block at block_index. | ||||
*/ | * If block_index is not provided, fall back to mempool. | ||||
bool GetTransaction(const TxId &txid, CTransactionRef &txOut, | * If mempool is not provided or the tx couldn't be found in mempool, fall back | ||||
const Consensus::Params ¶ms, BlockHash &hashBlock, | * to g_txindex. | ||||
const CBlockIndex *const blockIndex = nullptr); | * | ||||
* @param[in] block_index The block to read from disk, or nullptr | |||||
* @param[in] mempool If block_index is not provided, look in the | |||||
* mempool, if provided | |||||
* @param[in] txid The txid | |||||
* @param[in] consensusParams The params | |||||
* @param[out] hashBlock The hash of block_index, if the tx was found via | |||||
* block_index | |||||
* @returns The tx if found, otherwise nullptr | |||||
*/ | |||||
CTransactionRef GetTransaction(const CBlockIndex *const block_index, | |||||
const CTxMemPool *const mempool, | |||||
const TxId &txid, | |||||
const Consensus::Params &consensusParams, | |||||
BlockHash &hashBlock); | |||||
/** | /** | ||||
* Find the best known block, and make it the tip of the block chain | * Find the best known block, and make it the tip of the block chain | ||||
* | * | ||||
* May not be called with cs_main held. May not be called in a | * May not be called with cs_main held. May not be called in a | ||||
* validationinterface callback. | * validationinterface callback. | ||||
*/ | */ | ||||
bool ActivateBestChain( | bool ActivateBestChain( | ||||
const Config &config, BlockValidationState &state, | const Config &config, BlockValidationState &state, | ||||
▲ Show 20 Lines • Show All 1,015 Lines • Show Last 20 Lines |