Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | List of all members
SnapshotTestSetup Struct Reference
Inheritance diagram for SnapshotTestSetup:
[legend]
Collaboration diagram for SnapshotTestSetup:
[legend]

Public Member Functions

 SnapshotTestSetup ()
 
std::tuple< Chainstate *, Chainstate * > SetupSnapshot ()
 
ChainstateManagerSimulateNodeRestart ()
 
- Public Member Functions inherited from TestChain100Setup
 TestChain100Setup (const ChainType chain_type=ChainType::REGTEST, const std::vector< const char * > &extra_args={}, const bool coins_db_in_memory=true, const bool block_tree_db_in_memory=true)
 
CBlock CreateAndProcessBlock (const std::vector< CMutableTransaction > &txns, const CScript &scriptPubKey, Chainstate *chainstate=nullptr)
 Create a new block with just given transactions, coinbase paying to scriptPubKey, and try to add it to the current chain. More...
 
CBlock CreateBlock (const std::vector< CMutableTransaction > &txns, const CScript &scriptPubKey, Chainstate &chainstate)
 Create a new block with just given transactions, coinbase paying to scriptPubKey. More...
 
void mineBlocks (int num_blocks)
 Mine a series of new blocks on the active chain. More...
 
std::pair< CMutableTransaction, CAmountCreateValidTransaction (const std::vector< CTransactionRef > &input_transactions, const std::vector< COutPoint > &inputs, int input_height, const std::vector< CKey > &input_signing_keys, const std::vector< CTxOut > &outputs, const std::optional< CFeeRate > &feerate, const std::optional< uint32_t > &fee_output)
 Create a transaction, optionally setting the fee based on the feerate. More...
 
CMutableTransaction CreateValidMempoolTransaction (const std::vector< CTransactionRef > &input_transactions, const std::vector< COutPoint > &inputs, int input_height, const std::vector< CKey > &input_signing_keys, const std::vector< CTxOut > &outputs, bool submit=true)
 Create a transaction and, optionally, submit to the mempool. More...
 
CMutableTransaction CreateValidMempoolTransaction (CTransactionRef input_transaction, uint32_t input_vout, int input_height, CKey input_signing_key, CScript output_destination, CAmount output_amount=CAmount(1 *COIN), bool submit=true)
 Create a 1-in-1-out transaction and, optionally, submit to the mempool. More...
 
std::vector< CTransactionRefPopulateMempool (FastRandomContext &det_rand, size_t num_transactions, bool submit)
 Create transactions spending from m_coinbase_txns. More...
 
void MockMempoolMinFee (const CFeeRate &target_feerate)
 Mock the mempool minimum feerate by adding a transaction and calling TrimToSize(0), simulating the mempool "reaching capacity" and evicting by descendant feerate. More...
 
- Public Member Functions inherited from TestingSetup
 TestingSetup (const ChainType chainType=ChainType::MAIN, const std::vector< const char * > &extra_args={}, const bool coins_db_in_memory=true, const bool block_tree_db_in_memory=true)
 
- Public Member Functions inherited from ChainTestingSetup
 ChainTestingSetup (const ChainType chainType=ChainType::MAIN, const std::vector< const char * > &extra_args={})
 
 ~ChainTestingSetup ()
 
void LoadVerifyActivateChainstate ()
 
- Public Member Functions inherited from BasicTestingSetup
 BasicTestingSetup (const ChainType chainType=ChainType::MAIN, const std::vector< const char * > &extra_args={})
 
 ~BasicTestingSetup ()
 

Additional Inherited Members

- Public Attributes inherited from TestChain100Setup
std::vector< CTransactionRefm_coinbase_txns
 
CKey coinbaseKey
 
- Public Attributes inherited from ChainTestingSetup
node::CacheSizes m_cache_sizes {}
 
bool m_coins_db_in_memory {true}
 
bool m_block_tree_db_in_memory {true}
 
- Public Attributes inherited from BasicTestingSetup
util::SignalInterrupt m_interrupt
 
node::NodeContext m_node
 
fs::path m_path_root
 
fs::path m_path_lock
 
bool m_has_custom_datadir {false}
 
ArgsManager m_args
 

Detailed Description

Definition at line 161 of file validation_chainstatemanager_tests.cpp.

Constructor & Destructor Documentation

◆ SnapshotTestSetup()

SnapshotTestSetup::SnapshotTestSetup ( )
inline

Definition at line 168 of file validation_chainstatemanager_tests.cpp.

Member Function Documentation

◆ SetupSnapshot()

std::tuple<Chainstate*, Chainstate*> SnapshotTestSetup::SetupSnapshot ( )
inline

Definition at line 177 of file validation_chainstatemanager_tests.cpp.

Here is the call graph for this function:

◆ SimulateNodeRestart()

ChainstateManager& SnapshotTestSetup::SimulateNodeRestart ( )
inline

Definition at line 363 of file validation_chainstatemanager_tests.cpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: