Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/processor_tests.cpp
Show First 20 Lines • Show All 854 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < avanodes.size(); i++) { | ||||
runEventLoop(); | runEventLoop(); | ||||
} | } | ||||
// Now only the first node can vote. All others would be duplicate in the | // Now only the first node can vote. All others would be duplicate in the | ||||
// quorum. | // quorum. | ||||
auto confidence = m_processor->getConfidence(pindex); | auto confidence = m_processor->getConfidence(pindex); | ||||
BOOST_REQUIRE(confidence > 0); | BOOST_REQUIRE(confidence > 0); | ||||
for (auto &[nodeid, round] : node_round_map) { | for (auto &[nodeid, r] : node_round_map) { | ||||
uint64_t r = round; | |||||
if (nodeid == firstNodeId) { | if (nodeid == firstNodeId) { | ||||
// Node 0 is the only one which can vote at this stage. | // Node 0 is the only one which can vote at this stage. | ||||
round = r; | round = r; | ||||
continue; | continue; | ||||
} | } | ||||
BOOST_CHECK( | BOOST_CHECK( | ||||
registerVotes(nodeid, {r, 0, {Vote(0, blockHash)}}, updates)); | registerVotes(nodeid, {r, 0, {Vote(0, blockHash)}}, updates)); | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |