Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | if (nit == nodes.end()) { | ||||
n.pubkey = std::move(pubkey); | n.pubkey = std::move(pubkey); | ||||
})) { | })) { | ||||
return false; | return false; | ||||
} | } | ||||
// We actually have this node already, we need to update it. | // We actually have this node already, we need to update it. | ||||
bool success = removeNodeFromPeer(peers.find(oldpeerid)); | bool success = removeNodeFromPeer(peers.find(oldpeerid)); | ||||
assert(success); | assert(success); | ||||
// Make sure it is not invalidated. | |||||
it = peers.find(peerid); | |||||
} | } | ||||
bool success = addNodeToPeer(it); | bool success = addNodeToPeer(it); | ||||
assert(success); | assert(success); | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 466 Lines • Show Last 20 Lines |