mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-29 23:33:33 +02:00
rpc: Avoid useless mempool query in gettxoutproof
This commit is contained in:
@@ -164,8 +164,19 @@ bool LoadGenesisBlock(const CChainParams& chainparams);
|
||||
void UnloadBlockIndex();
|
||||
/** Run an instance of the script checking thread */
|
||||
void ThreadScriptCheck(int worker_num);
|
||||
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
|
||||
bool GetTransaction(const uint256& hash, CTransactionRef& tx, const Consensus::Params& params, uint256& hashBlock, const CBlockIndex* const blockIndex = nullptr);
|
||||
/**
|
||||
* Return transaction from the block at block_index.
|
||||
* If block_index is not provided, fall back to mempool.
|
||||
* If mempool is not provided or the tx couldn't be found in mempool, fall back to g_txindex.
|
||||
*
|
||||
* @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] hash 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 uint256& hash, const Consensus::Params& consensusParams, uint256& hashBlock);
|
||||
/**
|
||||
* Find the best known block, and make it the tip of the block chain
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user