40 int64_t max_time = -1;
44 int64_t mtp_time = -1;
48 bool cur_active{
false}, next_active{
false};
51 BOOST_CHECK(chain->findBlock(active[99]->GetBlockHash(),
FoundBlock().inActiveChain(cur_active).nextBlock(
FoundBlock().inActiveChain(next_active).hash(next_hash))));
55 cur_active = next_active =
false;
102 auto* orig_tip = active.
Tip();
103 for (
int i = 0; i < 10; ++i) {
105 m_node.
chainman->ActiveChainstate().InvalidateBlock(state, active.Tip());
108 coinbaseKey.MakeNewKey(
true);
109 for (
int i = 0; i < 20; ++i) {
116 BOOST_CHECK(chain->findCommonAncestor(orig_tip->GetBlockHash(), active.Tip()->GetBlockHash(),
FoundBlock().height(fork_height).hash(fork_hash),
FoundBlock().height(orig_height)));
121 uint256 active_hash, orig_hash;
122 BOOST_CHECK(!chain->findCommonAncestor(active.Tip()->GetBlockHash(), {}, {},
FoundBlock().hash(active_hash), {}));
123 BOOST_CHECK(!chain->findCommonAncestor({}, orig_tip->GetBlockHash(), {}, {},
FoundBlock().hash(orig_hash)));
140 active[5]->nStatus &= ~BLOCK_HAVE_DATA;
146 active[95]->nStatus &= ~BLOCK_HAVE_DATA;
152 active[50]->nStatus &= ~BLOCK_HAVE_DATA;
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
std::unique_ptr< ChainstateManager > chainman
std::unique_ptr< interfaces::Chain > chain