@@ -5959,12 +5959,11 @@ bool ValidateQuery::check_one_transaction_ts(block::Account& account, ton::Logic
59595959 std::unique_ptr<block::transaction::Transaction> trs =
59605960 std::make_unique<block::transaction::Transaction>(account, trans_type, lt, now_, in_msg_root);
59615961 td::RealCpuTimer timer;
5962- // todo(vadim@avevad.com): implement work time stats
5963- // SCOPE_EXIT {
5964- // stats_.work_time.trx_tvm += trs->time_tvm;
5965- // stats_.work_time.trx_storage_stat += trs->time_storage_stat;
5966- // stats_.work_time.trx_other += timer.elapsed_both() - trs->time_tvm - trs->time_storage_stat;
5967- // };
5962+ SCOPE_EXIT {
5963+ ctx.work_time .trx_tvm += trs->time_tvm ;
5964+ ctx.work_time .trx_storage_stat += trs->time_storage_stat ;
5965+ ctx.work_time .trx_other += timer.elapsed_both () - trs->time_tvm - trs->time_storage_stat ;
5966+ };
59685967 if (in_msg_root.not_null ()) {
59695968 if (!trs->unpack_input_msg (ihr_delivered, &action_phase_cfg_)) {
59705969 // inbound external message was not accepted
@@ -6204,19 +6203,29 @@ bool ValidateQuery::check_transactions() {
62046203 }
62056204
62066205 for (size_t pos = 0 ; pos < account_addresses.size (); pos++) {
6207- for (auto & e : account_contexts[pos].msg_proc_lt ) {
6206+ auto &ctx = account_contexts[pos];
6207+
6208+ for (auto & e : ctx.msg_proc_lt ) {
62086209 msg_proc_lt_.emplace_back (std::move (e));
62096210 }
6210- for (auto & e : account_contexts[pos].lib_publishers_ ) {
6211+
6212+ for (auto & e : ctx.lib_publishers_ ) {
62116213 lib_publishers_.push_back (e);
62126214 }
6213- if (account_contexts[pos].defer_all_messages ) {
6215+
6216+ if (ctx.defer_all_messages ) {
62146217 account_expected_defer_all_messages_.insert (account_addresses[pos]);
62156218 }
6216- for (auto & e : account_contexts[pos].storage_stat_cache_update ) {
6219+
6220+ for (auto & e : ctx.storage_stat_cache_update ) {
62176221 storage_stat_cache_update_.push_back (e);
62186222 }
6219- total_burned_ += account_contexts[pos].total_burned ;
6223+
6224+ stats_.work_time .trx_tvm += ctx.work_time .trx_tvm ;
6225+ stats_.work_time .trx_storage_stat += ctx.work_time .trx_storage_stat ;
6226+ stats_.work_time .trx_other += ctx.work_time .trx_other ;
6227+
6228+ total_burned_ += ctx.total_burned ;
62206229 }
62216230
62226231 return true ;
0 commit comments