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

Reload validator options when needed

This commit is contained in:
SpyCheese 2022-08-16 13:54:15 +03:00
parent 011e97f53c
commit be2169e523
10 changed files with 47 additions and 4 deletions

View file

@ -2696,6 +2696,16 @@ void ValidatorManagerImpl::add_collator(adnl::AdnlNodeIdShort id, ShardIdFull sh
td::actor::send_closure(it->second, &CollatorNode::add_shard, shard);
}
void ValidatorManagerImpl::update_options(td::Ref<ValidatorManagerOptions> opts) {
if (!shard_client_.empty()) {
td::actor::send_closure(shard_client_, &ShardClient::update_options, opts);
}
if (!serializer_.empty()) {
td::actor::send_closure(serializer_, &AsyncStateSerializer::update_options, opts);
}
opts_ = std::move(opts);
}
td::actor::ActorOwn<ValidatorManagerInterface> ValidatorManagerFactory::create(
td::Ref<ValidatorManagerOptions> opts, std::string db_root, td::actor::ActorId<keyring::Keyring> keyring,
td::actor::ActorId<adnl::Adnl> adnl, td::actor::ActorId<rldp::Rldp> rldp,