From c52b7d8172f0836ef6dc8b0cabfafa7ee504dc70 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 31 Jan 2024 17:38:23 -0600 Subject: [PATCH] Add additional info to assert message to inform user of file that can't be renamed. --- libraries/chain/snapshot_scheduler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/chain/snapshot_scheduler.cpp b/libraries/chain/snapshot_scheduler.cpp index 38191222ac..b666a9360f 100644 --- a/libraries/chain/snapshot_scheduler.cpp +++ b/libraries/chain/snapshot_scheduler.cpp @@ -219,7 +219,8 @@ void snapshot_scheduler::create_snapshot(next_function nex std::error_code ec; fs::rename(temp_path, pending_path, ec); EOS_ASSERT(!ec, snapshot_finalization_exception, - "Unable to promote temp snapshot to pending for block number ${bn}: [code: ${ec}] ${message}", + "Unable to promote temp snapshot ${t} to pending ${p} for block number ${bn}: [code: ${ec}] ${message}", + ("t", temp_path.generic_string())("p", pending_path.generic_string()) ("bn", head_block_num)("ec", ec.value())("message", ec.message())); _pending_snapshot_index.emplace(head_id, next, pending_path.generic_string(), snapshot_path.generic_string()); add_pending_snapshot_info(snapshot_information{head_id, head_block_num, head_block_time, chain_snapshot_header::current_version, pending_path.generic_string()});