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

Improve collator node pings and collation manager stats

This commit is contained in:
SpyCheese 2024-11-28 14:13:49 +03:00
parent 5fae8db7a0
commit 923f1cd69b
8 changed files with 66 additions and 7 deletions

View file

@ -2754,6 +2754,9 @@ void ValidatorManagerImpl::update_shard_client_block_handle(BlockHandle handle,
last_liteserver_state_ = std::move(state);
}
}
for (auto &c : collator_nodes_) {
td::actor::send_closure(c.second.actor, &CollatorNode::update_shard_client_handle, shard_client_handle_);
}
shard_client_update(seqno);
promise.set_value(td::Unit());
}
@ -3509,6 +3512,13 @@ void ValidatorManagerImpl::add_collator(adnl::AdnlNodeIdShort id, ShardIdFull sh
if (it == collator_nodes_.end()) {
it = collator_nodes_.emplace(id, Collator()).first;
it->second.actor = td::actor::create_actor<CollatorNode>("collatornode", id, opts_, actor_id(this), adnl_, rldp_);
if (last_masterchain_state_.not_null()) {
td::actor::send_closure(it->second.actor, &CollatorNode::new_masterchain_block_notification,
last_masterchain_state_);
}
if (shard_client_handle_) {
td::actor::send_closure(it->second.actor, &CollatorNode::update_shard_client_handle, shard_client_handle_);
}
}
if (!it->second.shards.insert(shard).second) {
return;