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

Collator nodes preload msg queues

This commit is contained in:
SpyCheese 2022-08-12 16:14:03 +03:00
parent 910398da92
commit 597fd8443d
4 changed files with 78 additions and 10 deletions

View file

@ -181,10 +181,17 @@ class ValidatorManagerImpl : public ValidatorManager {
waiting_.resize(j);
}
};
template <typename ActorT, typename ResType>
struct WaitListCaching : public WaitList<ActorT, ResType> {
bool done_ = false;
ResType result_;
td::Timestamp remove_at_;
};
std::map<BlockIdExt, WaitList<WaitBlockState, td::Ref<ShardState>>> wait_state_;
std::map<BlockIdExt, WaitList<WaitBlockData, td::Ref<BlockData>>> wait_block_data_;
std::map<std::pair<BlockIdExt, ShardIdFull>, WaitList<WaitOutMsgQueueProof, td::Ref<OutMsgQueueProof>>>
std::map<std::pair<BlockIdExt, ShardIdFull>, WaitListCaching<WaitOutMsgQueueProof, td::Ref<OutMsgQueueProof>>>
wait_out_msg_queue_proof_;
td::Timestamp cleanup_wait_caches_at_ = td::Timestamp::now();
struct WaitBlockHandle {
std::vector<td::Promise<BlockHandle>> waiting_;