Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/processor_tests.cpp
Show First 20 Lines • Show All 412 Lines • ▼ Show 20 Lines | for (int i = 1; i < AVALANCHE_MAX_INFLIGHT_POLL; i++) { | ||||
for (int j = 1; j < i; j++) { | for (int j = 1; j < i; j++) { | ||||
BOOST_CHECK(vrinflight.registerPoll()); | BOOST_CHECK(vrinflight.registerPoll()); | ||||
BOOST_CHECK(vrinflight.shouldPoll()); | BOOST_CHECK(vrinflight.shouldPoll()); | ||||
} | } | ||||
BOOST_CHECK(vrinflight.registerPoll()); | BOOST_CHECK(vrinflight.registerPoll()); | ||||
BOOST_CHECK(!vrinflight.shouldPoll()); | BOOST_CHECK(!vrinflight.shouldPoll()); | ||||
} | } | ||||
vrinflight.clearInflightRequest(AVALANCHE_MAX_INFLIGHT_POLL); | |||||
BOOST_CHECK(vrinflight.shouldPoll()); | |||||
// Check that clearing too many inflight requests still leaves us in a good | |||||
// state. | |||||
vrinflight.clearInflightRequest(); | |||||
BOOST_CHECK(vrinflight.shouldPoll()); | |||||
} | } | ||||
BOOST_AUTO_TEST_CASE(block_update) { | BOOST_AUTO_TEST_CASE(block_update) { | ||||
CBlockIndex index; | CBlockIndex index; | ||||
CBlockIndex *pindex = &index; | CBlockIndex *pindex = &index; | ||||
std::set<VoteStatus> status{ | std::set<VoteStatus> status{ | ||||
VoteStatus::Invalid, | VoteStatus::Invalid, | ||||
▲ Show 20 Lines • Show All 952 Lines • Show Last 20 Lines |