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

Option for collating masterchain on validators

This commit is contained in:
SpyCheese 2023-01-16 19:30:15 +03:00
parent d324fa5820
commit 225f71238b
9 changed files with 72 additions and 41 deletions

View file

@ -50,7 +50,8 @@ void ValidatorGroup::generate_block_candidate(td::uint32 round_id, td::Promise<B
cache = cached_collated_block_](td::Result<BlockCandidate> R) {
td::actor::send_closure(SelfId, &ValidatorGroup::generated_block_candidate, std::move(cache), std::move(R));
};
if (lite_mode_) {
if (mode_ == ValidatorManagerOptions::validator_lite_all ||
(mode_ == ValidatorManagerOptions::validator_lite_shards && !shard_.is_masterchain())) {
send_collate_query(round_id, td::Timestamp::in(10.0), std::move(P));
return;
}
@ -197,7 +198,8 @@ void ValidatorGroup::accept_block_query(BlockIdExt block_id, td::Ref<BlockData>
});
run_accept_block_query(block_id, std::move(block), std::move(prev), validator_set_, std::move(sig_set),
std::move(approve_sig_set), send_broadcast, shard_.is_masterchain() || !lite_mode_, manager_,
std::move(approve_sig_set), send_broadcast,
shard_.is_masterchain() || mode_ == ValidatorManagerOptions::validator_normal, manager_,
std::move(P));
}