mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Cache result of run_collate_query in ValidatorGroup
This commit is contained in:
parent
0686c08d57
commit
4714726f4a
2 changed files with 43 additions and 3 deletions
|
@ -116,6 +116,14 @@ class ValidatorGroup : public td::actor::Actor {
|
|||
bool started_ = false;
|
||||
bool allow_unsafe_self_blocks_resync_;
|
||||
td::uint32 last_known_round_id_ = 0;
|
||||
|
||||
struct CachedCollatedBlock {
|
||||
td::optional<BlockCandidate> result;
|
||||
std::vector<td::Promise<BlockCandidate>> promises;
|
||||
};
|
||||
std::shared_ptr<CachedCollatedBlock> cached_collated_block_;
|
||||
|
||||
void generated_block_candidate(std::shared_ptr<CachedCollatedBlock> cache, td::Result<BlockCandidate> R);
|
||||
};
|
||||
|
||||
} // namespace validator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue