mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add "delshard", "delcollator" to validator-engine-console
This commit is contained in:
parent
e3823c46f3
commit
d4339b839c
13 changed files with 241 additions and 5 deletions
|
@ -54,10 +54,20 @@ void CollatorNode::tear_down() {
|
|||
}
|
||||
|
||||
void CollatorNode::add_shard(ShardIdFull shard) {
|
||||
if (std::find(shards_.begin(), shards_.end(), shard) != shards_.end()) {
|
||||
return;
|
||||
}
|
||||
LOG(INFO) << "Collator node: local_id=" << local_id_ << " , shard=" << shard.to_str();
|
||||
shards_.push_back(shard);
|
||||
}
|
||||
|
||||
void CollatorNode::del_shard(ShardIdFull shard) {
|
||||
auto it = std::find(shards_.begin(), shards_.end(), shard);
|
||||
if (it != shards_.end()) {
|
||||
shards_.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void CollatorNode::new_masterchain_block_notification(td::Ref<MasterchainState> state) {
|
||||
std::vector<BlockIdExt> top_blocks = {state->get_block_id()};
|
||||
std::vector<ShardIdFull> next_shards;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue