mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
LS queries to nonfinal blocks (#941)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
0feaaf591c
commit
9452c367e4
23 changed files with 809 additions and 150 deletions
|
|
@ -376,6 +376,15 @@ class ValidatorSessionRoundState : public ValidatorSessionDescription::RootObjec
|
|||
void dump(ValidatorSessionDescription& desc, td::StringBuilder& sb, td::uint32 att) const;
|
||||
void dump_cur_attempt(ValidatorSessionDescription& desc, td::StringBuilder& sb) const;
|
||||
|
||||
void for_each_sent_block(std::function<void(const SessionBlockCandidate*)> foo) const {
|
||||
if (!sent_blocks_) {
|
||||
return;
|
||||
}
|
||||
for (td::uint32 i = 0; i < sent_blocks_->size(); ++i) {
|
||||
foo(sent_blocks_->at(i));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
const SentBlock* precommitted_block_;
|
||||
const td::uint32 seqno_;
|
||||
|
|
@ -516,6 +525,19 @@ class ValidatorSessionState : public ValidatorSessionDescription::RootObject {
|
|||
cur_round_->dump_cur_attempt(desc, sb);
|
||||
}
|
||||
|
||||
void for_each_cur_round_sent_block(std::function<void(const SessionBlockCandidate*)> foo) const {
|
||||
cur_round_->for_each_sent_block(std::move(foo));
|
||||
}
|
||||
|
||||
const SentBlock* get_cur_round_precommitted_block() const {
|
||||
bool found;
|
||||
return cur_round_->get_precommitted_block(found);
|
||||
}
|
||||
|
||||
const CntVector<const SessionBlockCandidateSignature*>* get_cur_round_signatures() const {
|
||||
return cur_round_->get_signatures();
|
||||
}
|
||||
|
||||
static const ValidatorSessionState* make_one(ValidatorSessionDescription& desc, const ValidatorSessionState* state,
|
||||
td::uint32 src_idx, td::uint32 att, bool& made);
|
||||
static const ValidatorSessionState* make_all(ValidatorSessionDescription& desc, const ValidatorSessionState* state,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue