mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve handling outbound message queues (#825)
* Improve handling outbound message queues * Cleanup queue faster * Calculate queue sizes in background * Force or limit split/merge depending on queue size * Increase validate_ref limit for transaction * Add all changes of public libraries to block size estimation * Don't crash on timeout in GC * Don't import external messages when queue is too big --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
3a595ce849
commit
5e6b67ae96
16 changed files with 727 additions and 111 deletions
|
@ -3397,6 +3397,19 @@ void ValidatorEngine::run_control_query(ton::ton_api::engine_validator_getShardO
|
|||
promise.set_value(create_control_query_error(td::Status::Error(ton::ErrorCode::notready, "no such block")));
|
||||
return;
|
||||
}
|
||||
if (!dest) {
|
||||
td::actor::send_closure(
|
||||
manager, &ton::validator::ValidatorManagerInterface::get_out_msg_queue_size, handle->id(),
|
||||
[promise = std::move(promise)](td::Result<td::uint32> R) mutable {
|
||||
if (R.is_error()) {
|
||||
promise.set_value(create_control_query_error(R.move_as_error_prefix("failed to get queue size: ")));
|
||||
} else {
|
||||
promise.set_value(ton::create_serialize_tl_object<ton::ton_api::engine_validator_shardOutQueueSize>(
|
||||
R.move_as_ok()));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
td::actor::send_closure(
|
||||
manager, &ton::validator::ValidatorManagerInterface::get_shard_state_from_db, handle,
|
||||
[=, promise = std::move(promise)](td::Result<td::Ref<ton::validator::ShardState>> R) mutable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue