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

Use previous and next validators in fast sync overlays

This commit is contained in:
SpyCheese 2024-07-17 15:34:45 +03:00
parent 3ab7cc3c73
commit d81b69e38b

View file

@ -318,14 +318,14 @@ void FullNodeFastSyncOverlays::update_overlays(td::Ref<MasterchainState> state,
for (const ValidatorDescr &val : val_set->export_vector()) {
PublicKeyHash public_key_hash = ValidatorFullId{val.key}.compute_short_id();
root_public_keys_.push_back(public_key_hash);
if (i == 0) {
current_validators_adnl_.emplace_back(val.addr.is_zero() ? public_key_hash.bits256_value() : val.addr);
}
current_validators_adnl_.emplace_back(val.addr.is_zero() ? public_key_hash.bits256_value() : val.addr);
}
}
std::sort(root_public_keys_.begin(), root_public_keys_.end());
root_public_keys_.erase(std::unique(root_public_keys_.begin(), root_public_keys_.end()), root_public_keys_.end());
std::sort(current_validators_adnl_.begin(), current_validators_adnl_.end());
current_validators_adnl_.erase(std::unique(current_validators_adnl_.begin(), current_validators_adnl_.end()),
current_validators_adnl_.end());
for (auto &[local_id, overlays_info] : id_to_overlays_) {
overlays_info.is_validator_ =