@@ -573,7 +573,7 @@ bool Collator::request_aux_mc_state(BlockSeqno seqno, Ref<MasterchainStateQ>& st
573573 CHECK (blkid.is_valid_ext () && blkid.is_masterchain ());
574574 LOG (DEBUG) << " sending auxiliary wait_block_state() query for " << blkid.to_str () << " to Manager" ;
575575 ++pending;
576- auto token = perf_log_.start_action (PSTRING () << " auxiliary wait_block_state " << blkid.to_str ());
576+ auto token = perf_log_.start_action (PSTRING () << " auxiliary wait_block_state " << blkid.seqno ());
577577 td::actor::send_closure_later (
578578 manager, &ValidatorManager::wait_block_state_short, blkid, priority (), timeout, false ,
579579 [self = get_self (), blkid, token = std::move (token)](td::Result<Ref<ShardState>> res) mutable {
@@ -6492,16 +6492,18 @@ bool Collator::create_block_candidate() {
64926492 }
64936493 // 4. save block candidate
64946494 if (skip_store_candidate_) {
6495- td::actor::send_closure_later (actor_id (this ), &Collator::return_block_candidate, td::Unit ());
6495+ td::actor::send_closure_later (actor_id (this ), &Collator::return_block_candidate, td::Unit (), td::PerfLogAction{} );
64966496 } else {
64976497 LOG (INFO) << " saving new BlockCandidate" ;
6498- td::actor::send_closure_later (
6499- manager, &ValidatorManager::set_block_candidate, block_candidate->id , block_candidate->clone (),
6500- validator_set_->get_catchain_seqno (), validator_set_->get_validator_set_hash (),
6501- [self = get_self ()](td::Result<td::Unit> saved) -> void {
6502- LOG (DEBUG) << " got answer to set_block_candidate" ;
6503- td::actor::send_closure_later (std::move (self), &Collator::return_block_candidate, std::move (saved));
6504- });
6498+ auto token = perf_log_.start_action (" set_block_candidate" );
6499+ td::actor::send_closure_later (manager, &ValidatorManager::set_block_candidate, block_candidate->id ,
6500+ block_candidate->clone (), validator_set_->get_catchain_seqno (),
6501+ validator_set_->get_validator_set_hash (),
6502+ [self = get_self (), token = std::move (token)](td::Result<td::Unit> saved) mutable {
6503+ LOG (DEBUG) << " got answer to set_block_candidate" ;
6504+ td::actor::send_closure_later (std::move (self), &Collator::return_block_candidate,
6505+ std::move (saved), std::move (token));
6506+ });
65056507 }
65066508 // 5. communicate about bad and delayed external messages
65076509 if (!bad_ext_msgs_.empty () || !delay_ext_msgs_.empty ()) {
@@ -6521,8 +6523,9 @@ bool Collator::create_block_candidate() {
65216523 *
65226524 * @param saved The result of saving the block candidate to the disk.
65236525 */
6524- void Collator::return_block_candidate (td::Result<td::Unit> saved) {
6526+ void Collator::return_block_candidate (td::Result<td::Unit> saved, td::PerfLogAction token ) {
65256527 // 6. return data to the original "caller"
6528+ token.finish (saved);
65266529 if (saved.is_error ()) {
65276530 auto err = saved.move_as_error ();
65286531 LOG (ERROR) << " cannot save block candidate: " << err.to_string ();
0 commit comments