mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve large OutMsgQueue clearance (#822)
* Improve Collator::opt_msg_queue_cleanup, increase collator timeout * Disable importing ext msgs if queue is too big * Extend timeout in collator if previous block is too old --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
51baec48a0
commit
7fcf267717
6 changed files with 105 additions and 25 deletions
|
@ -126,6 +126,15 @@ class ValidatorGroup : public td::actor::Actor {
|
|||
std::shared_ptr<CachedCollatedBlock> cached_collated_block_;
|
||||
|
||||
void generated_block_candidate(std::shared_ptr<CachedCollatedBlock> cache, td::Result<BlockCandidate> R);
|
||||
|
||||
typedef std::tuple<td::Bits256, BlockIdExt, FileHash, FileHash> CacheKey;
|
||||
std::map<CacheKey, UnixTime> approved_candidates_cache_;
|
||||
|
||||
void update_approve_cache(CacheKey key, UnixTime value);
|
||||
|
||||
static CacheKey block_to_cache_key(const BlockCandidate& block) {
|
||||
return std::make_tuple(block.pubkey.as_bits256(), block.id, sha256_bits256(block.data), block.collated_file_hash);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace validator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue