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

Send block broadcasts directly to collators

This commit is contained in:
SpyCheese 2022-09-27 16:33:27 +03:00
parent b0c2c6c525
commit 699a56b951
20 changed files with 143 additions and 26 deletions

View file

@ -92,7 +92,16 @@ class FullNodeImpl : public FullNode {
td::Promise<td::Unit> started_promise);
private:
struct ShardInfo {
bool exists = false;
td::actor::ActorOwn<FullNodeShard> actor;
FullNodeShardMode mode = FullNodeShardMode::inactive;
td::Timestamp delete_at = td::Timestamp::never();
};
void add_shard_actor(ShardIdFull shard, FullNodeShardMode mode);
void update_collators(td::Ref<MasterchainState> state);
void update_shard_collators(ShardIdFull shard, ShardInfo& info);
PublicKeyHash local_id_;
adnl::AdnlNodeIdShort adnl_id_;
@ -100,13 +109,6 @@ class FullNodeImpl : public FullNode {
td::actor::ActorId<FullNodeShard> get_shard(AccountIdPrefixFull dst);
td::actor::ActorId<FullNodeShard> get_shard(ShardIdFull shard, bool exact = false);
struct ShardInfo {
bool exists = false;
td::actor::ActorOwn<FullNodeShard> actor;
FullNodeShardMode mode = FullNodeShardMode::inactive;
td::Timestamp delete_at = td::Timestamp::never();
};
std::map<ShardIdFull, ShardInfo> shards_;
td::actor::ActorId<keyring::Keyring> keyring_;
@ -125,6 +127,8 @@ class FullNodeImpl : public FullNode {
std::set<PublicKeyHash> local_keys_;
td::Promise<td::Unit> started_promise_;
bool collators_inited_ = false;
block::CollatorConfig collator_config_;
};
} // namespace fullnode