mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Dynamic catchain delays, state serialization improvements (#1140)
* Validator improvements * Fix cancelling state serialization * Disable state serializer on all mainnet validators * Flag --catchain-max-block-delay-slow * Set default catchain-max-block-delay to 0.4, delay-slow to 1.0 --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
97c57c3386
commit
e08111159f
15 changed files with 85 additions and 28 deletions
|
@ -478,6 +478,14 @@ class ValidatorSessionState : public ValidatorSessionDescription::RootObject {
|
|||
auto get_ts(td::uint32 src_idx) const {
|
||||
return att_->at(src_idx);
|
||||
}
|
||||
td::uint32 cur_attempt_in_round(const ValidatorSessionDescription& desc) const {
|
||||
td::uint32 first_attempt = cur_round_->get_first_attempt(desc.get_self_idx());
|
||||
td::uint32 cur_attempt = desc.get_attempt_seqno(desc.get_ts());
|
||||
if (cur_attempt < first_attempt || first_attempt == 0) {
|
||||
return 0;
|
||||
}
|
||||
return cur_attempt - first_attempt;
|
||||
}
|
||||
|
||||
const SentBlock* choose_block_to_sign(ValidatorSessionDescription& desc, td::uint32 src_idx, bool& found) const;
|
||||
const SentBlock* get_committed_block(ValidatorSessionDescription& desc, td::uint32 seqno) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue