Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 410 Lines • ▼ Show 20 Lines | std::map<CBlockIndex *, Vote> responseIndex; | ||||
if (!vr.registerVote(nodeid, v.GetError())) { | if (!vr.registerVote(nodeid, v.GetError())) { | ||||
// This vote did not provide any extra information, move on. | // This vote did not provide any extra information, move on. | ||||
continue; | continue; | ||||
} | } | ||||
if (!vr.hasFinalized()) { | if (!vr.hasFinalized()) { | ||||
// This item has note been finalized, so we have nothing more to | // This item has note been finalized, so we have nothing more to | ||||
// do. | // do. | ||||
updates.emplace_back( | updates.emplace_back(pindex, vr.isAccepted() | ||||
pindex, vr.isAccepted() ? BlockUpdate::Status::Accepted | ? VoteStatus::Accepted | ||||
: BlockUpdate::Status::Rejected); | : VoteStatus::Rejected); | ||||
continue; | continue; | ||||
} | } | ||||
// We just finalized a vote. If it is valid, then let the caller | // We just finalized a vote. If it is valid, then let the caller | ||||
// know. Either way, remove the item from the map. | // know. Either way, remove the item from the map. | ||||
updates.emplace_back(pindex, vr.isAccepted() | updates.emplace_back(pindex, vr.isAccepted() ? VoteStatus::Finalized | ||||
? BlockUpdate::Status::Finalized | : VoteStatus::Invalid); | ||||
: BlockUpdate::Status::Invalid); | |||||
w->erase(it); | w->erase(it); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
CPubKey Processor::getSessionPubKey() const { | CPubKey Processor::getSessionPubKey() const { | ||||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |