Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | bool PeerManager::latchAvaproofsSent(NodeId nodeid) { | ||||
} | } | ||||
return !it->avaproofsSent && | return !it->avaproofsSent && | ||||
nodes.modify(it, [&](Node &n) { n.avaproofsSent = true; }); | nodes.modify(it, [&](Node &n) { n.avaproofsSent = true; }); | ||||
} | } | ||||
static bool isOrphanState(const ProofValidationState &state) { | static bool isOrphanState(const ProofValidationState &state) { | ||||
return state.GetResult() == ProofValidationResult::MISSING_UTXO || | return state.GetResult() == ProofValidationResult::MISSING_UTXO || | ||||
state.GetResult() == ProofValidationResult::HEIGHT_MISMATCH; | state.GetResult() == ProofValidationResult::HEIGHT_MISMATCH || | ||||
state.GetResult() == ProofValidationResult::IMMATURE_UTXO; | |||||
} | } | ||||
bool PeerManager::updateNextPossibleConflictTime( | bool PeerManager::updateNextPossibleConflictTime( | ||||
PeerId peerid, const std::chrono::seconds &nextTime) { | PeerId peerid, const std::chrono::seconds &nextTime) { | ||||
auto it = peers.find(peerid); | auto it = peers.find(peerid); | ||||
if (it == peers.end()) { | if (it == peers.end()) { | ||||
// No such peer | // No such peer | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines |