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

Function BOOST_FIXTURE_TEST_CASE

src/test/blockchain_tests.cpp:98–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98BOOST_FIXTURE_TEST_CASE(get_prune_height, TestChain100Setup)
99{
100 LOCK(::cs_main);
101 const auto& chain = m_node.chainman->ActiveChain();
102 const auto& blockman = m_node.chainman->m_blockman;
103
104 // Fresh chain of 100 blocks without any pruned blocks, so std::nullopt should be returned
105 BOOST_CHECK(!GetPruneHeight(blockman, chain).has_value());
106
107 // Start pruning
108 CheckGetPruneHeight(blockman, chain, 1);
109 CheckGetPruneHeight(blockman, chain, 99);
110 CheckGetPruneHeight(blockman, chain, 100);
111}
112
113BOOST_AUTO_TEST_CASE(num_chain_tx_max)
114{

Callers

nothing calls this directly

Calls 5

GetPruneHeightFunction · 0.85
InvalidateBlockMethod · 0.80
has_valueMethod · 0.45
TipMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected