MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / initialize_tx_pool

Function initialize_tx_pool

src/test/fuzz/tx_pool.cpp:70–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70void initialize_tx_pool()
71{
72 static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
73 g_setup = testing_setup.get();
74 SetMockTime(WITH_LOCK(g_setup->m_node.chainman->GetMutex(), return g_setup->m_node.chainman->ActiveTip()->Time()));
75
76 for (int i = 0; i < 2 * COINBASE_MATURITY; ++i) {
77 COutPoint prevout{MineBlock(g_setup->m_node, {
78 .coinbase_output_script = P2WSH_OP_TRUE,
79 })};
80 // Remember the txids to avoid expensive disk access later on
81 auto& outpoints = i < COINBASE_MATURITY ?
82 g_outpoints_coinbase_init_mature :
83 g_outpoints_coinbase_init_immature;
84 outpoints.push_back(prevout);
85 }
86 g_setup->m_node.validation_signals->SyncWithValidationInterfaceQueue();
87}
88
89struct TransactionsDelta final : public CValidationInterface {
90 std::set<CTransactionRef>& m_removed;

Callers

nothing calls this directly

Calls 6

SetMockTimeFunction · 0.85
MineBlockFunction · 0.85
getMethod · 0.45
TimeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected