Skip to content

Commit

Permalink
Merge pull request #2178 from AntelopeIO/snapshot-rename-info-main
Browse files Browse the repository at this point in the history
[5.0 -> main] Report snapshot rename location on failure
  • Loading branch information
heifner authored Feb 1, 2024
2 parents efac04c + 1a79773 commit 3f8e645
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/chain/snapshot_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ void snapshot_scheduler::create_snapshot(next_function<snapshot_information> 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()});
Expand Down

0 comments on commit 3f8e645

Please sign in to comment.