mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix QueueSizeCounter and ValidatorGroup after merge
This commit is contained in:
parent
a2eb3f3631
commit
747b24aa18
8 changed files with 31 additions and 16 deletions
|
@ -591,13 +591,17 @@ class ValidatorManagerImpl : public ValidatorManager {
|
|||
void update_options(td::Ref<ValidatorManagerOptions> opts) override;
|
||||
|
||||
void get_out_msg_queue_size(BlockIdExt block_id, td::Promise<td::uint32> promise) override {
|
||||
if (last_masterchain_state_.is_null()) {
|
||||
promise.set_error(td::Status::Error(ErrorCode::notready, "not ready"));
|
||||
return;
|
||||
}
|
||||
if (queue_size_counter_.empty()) {
|
||||
if (last_masterchain_state_.is_null()) {
|
||||
promise.set_error(td::Status::Error(ErrorCode::notready, "not ready"));
|
||||
return;
|
||||
}
|
||||
queue_size_counter_ = td::actor::create_actor<QueueSizeCounter>("queuesizecounter",
|
||||
last_masterchain_state_, actor_id(this));
|
||||
queue_size_counter_ =
|
||||
td::actor::create_actor<QueueSizeCounter>("queuesizecounter", last_masterchain_state_, opts_, actor_id(this));
|
||||
}
|
||||
if (!opts_->need_monitor(block_id.shard_full(), last_masterchain_state_)) {
|
||||
return promise.set_error(
|
||||
td::Status::Error(PSTRING() << "not monitoring shard " << block_id.shard_full().to_str()));
|
||||
}
|
||||
td::actor::send_closure(queue_size_counter_, &QueueSizeCounter::get_queue_size, block_id, std::move(promise));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue