mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-13 11:42:18 +00:00
Limit query size in importing out queues
This commit is contained in:
parent
5c02459fd8
commit
e814973749
2 changed files with 6 additions and 1 deletions
|
@ -1850,6 +1850,8 @@ void ValidatorEngine::started_dht() {
|
|||
void ValidatorEngine::start_rldp() {
|
||||
rldp_ = ton::rldp::Rldp::create(adnl_.get());
|
||||
rldp2_ = ton::rldp2::Rldp::create(adnl_.get());
|
||||
td::actor::send_closure(rldp_, &ton::rldp::Rldp::set_default_mtu, 2048);
|
||||
td::actor::send_closure(rldp2_, &ton::rldp2::Rldp::set_default_mtu, 2048);
|
||||
started_rldp();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue