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

Add --lite-validator flag, rework is_validator checks

This commit is contained in:
SpyCheese 2022-08-08 14:08:57 +03:00
parent 7241522de2
commit 5ba2a55716
8 changed files with 50 additions and 58 deletions

View file

@ -214,7 +214,8 @@ class ValidatorEngine : public td::actor::Actor {
bool started_ = false;
ton::BlockSeqno truncate_seqno_{0};
std::string session_logs_file_;
bool masterchain_only_ = false;
bool not_all_shards_ = false;
bool validator_lite_mode_ = false;
std::set<ton::CatchainSeqno> unsafe_catchains_;
std::map<ton::BlockSeqno, std::pair<ton::CatchainSeqno, td::uint32>> unsafe_catchain_rotations_;
@ -266,9 +267,13 @@ class ValidatorEngine : public td::actor::Actor {
void add_key_to_set(ton::PublicKey key) {
keys_[key.compute_short_id()] = key;
}
void set_masterchain_only() {
masterchain_only_ = true;
void set_not_all_shards() {
not_all_shards_ = true;
}
void set_validator_lite_mode() {
validator_lite_mode_ = true;
}
void start_up() override;
ValidatorEngine() {
}