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

Bugfix in processing message queues; improve out_msg_queue_cleanup

This commit is contained in:
SpyCheese 2023-07-06 11:44:21 +03:00
parent 5dd0c15d07
commit f10c7f54a8
5 changed files with 68 additions and 17 deletions

View file

@ -528,6 +528,7 @@ bool ValidateQuery::extract_collated_data_from(Ref<vm::Cell> croot, int idx) {
return reject_query("invalid NeighborMsgQueueLimits");
}
neighbor_msg_queues_limits_ = vm::Dictionary{cs.prefetch_ref(0), 32 + 64};
return true;
}
LOG(WARNING) << "collated datum # " << idx << " has unknown type (magic " << cs.prefetch_ulong(32) << "), ignoring";
return true;
@ -4123,7 +4124,14 @@ bool ValidateQuery::check_in_queue() {
if (msg_limit < -1) {
return reject_query("invalid value in NeighborMsgQueueLimits");
}
LOG(DEBUG) << "Neighbor " << descr.shard().to_str() << " has msg_limit=" << msg_limit;
neighbor_queues.emplace_back(descr.top_block_id(), descr.outmsg_root, descr.disabled_, msg_limit);
if (msg_limit != -1 && descr.shard().is_masterchain()) {
return reject_query("masterchain out message queue cannot be limited");
}
if (msg_limit != -1 && shard_intersects(descr.shard(), shard_)) {
return reject_query("prev block out message queue cannot be limited");
}
}
block::OutputQueueMerger nb_out_msgs(shard_, std::move(neighbor_queues));
while (!nb_out_msgs.is_eof()) {