1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Improved neighbor choosing in full-node-shard

This commit is contained in:
SpyCheese 2022-08-12 12:10:46 +03:00
parent 662435462e
commit 910398da92
17 changed files with 185 additions and 105 deletions

View file

@ -235,12 +235,12 @@ void OverlayImpl::receive_message(adnl::AdnlNodeIdShort src, td::BufferSlice dat
auto X = fetch_tl_object<ton_api::overlay_Broadcast>(data.clone(), true);
if (X.is_error()) {
auto Y = fetch_tl_object<ton_api::overlay_message_removePeer>(data.clone(), true);
if (Y.is_ok()) {
if (Y.is_ok() && public_) {
VLOG(OVERLAY_DEBUG) << this << ": received removePeer message from " << src;
if (peers_.exists(src)) {
del_peer(src);
callback_->on_remove_peer(src);
}
callback_->on_remove_peer(src);
return;
}
}