12 #include <boost/test/unit_test.hpp>
39 int64_t max_time = -1;
43 int64_t mtp_time = -1;
47 bool cur_active{
false}, next_active{
false};
50 BOOST_CHECK(chain->findBlock(active[99]->GetBlockHash(),
FoundBlock().inActiveChain(cur_active).nextBlock(
FoundBlock().inActiveChain(next_active).hash(next_hash))));
54 cur_active = next_active =
false;
81 BOOST_CHECK(!chain->findAncestorByHeight(active[10]->GetBlockHash(), 20));
89 BOOST_CHECK(chain->findAncestorByHash(active[20]->GetBlockHash(), active[10]->GetBlockHash(),
FoundBlock().height(height)));
91 BOOST_CHECK(!chain->findAncestorByHash(active[10]->GetBlockHash(), active[20]->GetBlockHash()));
98 auto* orig_tip = active.
Tip();
99 for (
int i = 0; i < 10; ++i) {
104 coinbaseKey.MakeNewKey(
true);
105 for (
int i = 0; i < 20; ++i) {
117 uint256 active_hash, orig_hash;
119 BOOST_CHECK(!chain->findCommonAncestor({}, orig_tip->GetBlockHash(), {}, {},
FoundBlock().hash(orig_hash)));