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

Limit query size in importing out queues

This commit is contained in:
SpyCheese 2023-07-31 22:56:25 +03:00
parent 5c02459fd8
commit e814973749
2 changed files with 6 additions and 1 deletions

View file

@ -324,7 +324,10 @@ void OutMsgQueueImporter::get_neighbor_msg_queue_proofs(
auto limits = last_masterchain_state_->get_imported_msg_queue_limits(dst_shard.workchain);
for (auto& p : new_queries) {
++entry->pending;
get_proof_import(entry, std::move(p.second), limits);
for (size_t i = 0; i < p.second.size(); i += 16) {
size_t j = std::min(i + 16, p.second.size());
get_proof_import(entry, std::vector<BlockIdExt>(p.second.begin() + i, p.second.begin() + j), limits);
}
}
if (entry->pending == 0) {
finish_query(entry);