Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 287 Lines • ▼ Show 20 Lines | if (conflicting_peerids.size() > 0) { | ||||
assert(it != utxos.end()); | assert(it != utxos.end()); | ||||
// We need to delete that one. | // We need to delete that one. | ||||
if (it->second == peerid) { | if (it->second == peerid) { | ||||
utxos.erase(it); | utxos.erase(it); | ||||
} | } | ||||
} | } | ||||
// Orphan the proof so it can be pulled back if the conflicting ones are | |||||
// invalidated. | |||||
orphanProofs.addProof(proof); | |||||
return peers.end(); | return peers.end(); | ||||
} | } | ||||
// We have no peer for this proof, time to create it. | // We have no peer for this proof, time to create it. | ||||
auto inserted = peers.emplace(peerid, proof); | auto inserted = peers.emplace(peerid, proof); | ||||
assert(inserted.second); | assert(inserted.second); | ||||
// If there are nodes waiting for this proof, add them | // If there are nodes waiting for this proof, add them | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |