Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/proofpool_tests.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(add_remove_proof_no_conflict) { | ||||
} | } | ||||
BOOST_CHECK_EQUAL(testPool.size(), 0); | BOOST_CHECK_EQUAL(testPool.size(), 0); | ||||
BOOST_CHECK_EQUAL(testPool.countProofs(), 0); | BOOST_CHECK_EQUAL(testPool.countProofs(), 0); | ||||
} | } | ||||
BOOST_AUTO_TEST_CASE(rescan) { | BOOST_AUTO_TEST_CASE(rescan) { | ||||
gArgs.ForceSetArg("-avaproofstakeutxoconfirmations", "1"); | gArgs.ForceSetArg("-avaproofstakeutxoconfirmations", "1"); | ||||
ProofPool testPool; | ProofPool testPool; | ||||
avalanche::PeerManager pm; | avalanche::PeerManager pm(*m_node.scheduler); | ||||
testPool.rescan(pm); | testPool.rescan(pm); | ||||
BOOST_CHECK_EQUAL(testPool.size(), 0); | BOOST_CHECK_EQUAL(testPool.size(), 0); | ||||
BOOST_CHECK_EQUAL(testPool.countProofs(), 0); | BOOST_CHECK_EQUAL(testPool.countProofs(), 0); | ||||
// No peer should be created | // No peer should be created | ||||
bool hasPeer = false; | bool hasPeer = false; | ||||
pm.forEachPeer([&](const Peer &p) { hasPeer = true; }); | pm.forEachPeer([&](const Peer &p) { hasPeer = true; }); | ||||
▲ Show 20 Lines • Show All 274 Lines • Show Last 20 Lines |