Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/peermanager_tests.cpp
Show First 20 Lines • Show All 696 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(node_binding_reorg) { | ||||
// Make the proof great again | // Make the proof great again | ||||
{ | { | ||||
// Advance the clock so the newly mined block won't collide with the | // Advance the clock so the newly mined block won't collide with the | ||||
// other deterministically-generated blocks | // other deterministically-generated blocks | ||||
SetMockTime(GetTime() + 20); | SetMockTime(GetTime() + 20); | ||||
mineBlocks(1); | mineBlocks(1); | ||||
BlockValidationState state; | BlockValidationState state; | ||||
BOOST_CHECK( | BOOST_CHECK(chainman.ActiveChainstate().ActivateBestChain(state)); | ||||
chainman.ActiveChainstate().ActivateBestChain(GetConfig(), state)); | |||||
LOCK(chainman.GetMutex()); | LOCK(chainman.GetMutex()); | ||||
BOOST_CHECK_EQUAL(chainman.ActiveHeight(), 100); | BOOST_CHECK_EQUAL(chainman.ActiveHeight(), 100); | ||||
} | } | ||||
pm.updatedBlockTip(); | pm.updatedBlockTip(); | ||||
BOOST_CHECK(!pm.isImmature(proofid)); | BOOST_CHECK(!pm.isImmature(proofid)); | ||||
BOOST_CHECK(pm.isBoundToPeer(proofid)); | BOOST_CHECK(pm.isBoundToPeer(proofid)); | ||||
// The peerid has certainly been updated | // The peerid has certainly been updated | ||||
▲ Show 20 Lines • Show All 2,336 Lines • Show Last 20 Lines |