Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche.cpp
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | std::map<CBlockIndex *, AvalancheVote> responseIndex; | ||||
: AvalancheBlockUpdate::Status::Invalid); | : AvalancheBlockUpdate::Status::Invalid); | ||||
w->erase(it); | w->erase(it); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool AvalancheProcessor::addPeer(NodeId nodeid, uint32_t score) { | bool AvalancheProcessor::addPeer(NodeId nodeid, int64_t score) { | ||||
return peerSet.getWriteView() | return peerSet.getWriteView() | ||||
->insert({nodeid, score, std::chrono::steady_clock::now()}) | ->insert({nodeid, score, std::chrono::steady_clock::now()}) | ||||
.second; | .second; | ||||
} | } | ||||
namespace { | namespace { | ||||
/** | /** | ||||
* Run the avalanche event loop every 10ms. | * Run the avalanche event loop every 10ms. | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |