Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
txoutproof.cpp File Reference
#include <chain.h>
#include <chainparams.h>
#include <coins.h>
#include <index/txindex.h>
#include <merkleblock.h>
#include <node/blockstorage.h>
#include <primitives/transaction.h>
#include <rpc/blockchain.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <univalue.h>
#include <util/strencodings.h>
#include <validation.h>
Include dependency graph for txoutproof.cpp:

Go to the source code of this file.

Functions

static RPCHelpMan gettxoutproof ()
static RPCHelpMan verifytxoutproof ()
void RegisterTxoutProofRPCCommands (CRPCTable &t)
CTransactionRef GetTransaction (const CBlockIndex *block_index, const CTxMemPool *mempool, const Txid &hash, const BlockManager &blockman, uint256 &hashBlock)
 Return transaction with a given hash.

Function Documentation

◆ GetTransaction()

CTransactionRef node::GetTransaction ( const CBlockIndex *const block_index,
const CTxMemPool *const mempool,
const Txid & hash,
const BlockManager & blockman,
uint256 & hashBlock )

Return transaction with a given hash.

If mempool is provided and block_index is not provided, check it first for the tx. If -txindex is available, check it next for the tx. Finally, if block_index is provided, check for tx by reading entire block from disk.

Parameters
[in]block_indexThe block to read from disk, or nullptr
[in]mempoolIf provided, check mempool for tx
[in]hashThe txid
[in]blockmanUsed to access and read blocks from disk
[out]hashBlockThe block hash, if the tx was found via -txindex or block_index
Returns
The tx if found, otherwise nullptr

Definition at line 143 of file transaction.cpp.

Here is the caller graph for this function:

◆ gettxoutproof()

RPCHelpMan gettxoutproof ( )
static

Definition at line 23 of file txoutproof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterTxoutProofRPCCommands()

void RegisterTxoutProofRPCCommands ( CRPCTable & t)

Definition at line 177 of file txoutproof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ verifytxoutproof()

RPCHelpMan verifytxoutproof ( )
static

Definition at line 129 of file txoutproof.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: