Skip to content

Commit

Permalink
Merge remote-tracking branch 'spring/release/1.0' into GH-559-snapsho…
Browse files Browse the repository at this point in the history
…t-chain_head-main
  • Loading branch information
heifner committed Aug 19, 2024
2 parents 754d75f + 89dba19 commit d6b6b67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,12 @@ void chain_plugin_impl::plugin_initialize(const variables_map& options) {
"--snapshot is incompatible with --genesis-json as the snapshot contains genesis information");

auto shared_mem_path = chain_config->state_dir / "shared_memory.bin";
EOS_ASSERT( !std::filesystem::is_regular_file(shared_mem_path),
plugin_config_exception,
"Snapshot can only be used to initialize an empty database." );
auto chain_head_path = chain_config->state_dir / chain_head_filename;
EOS_ASSERT(!std::filesystem::is_regular_file(shared_mem_path) &&
!std::filesystem::is_regular_file(chain_head_path),
plugin_config_exception,
"Snapshot can only be used to initialize an empty database, remove directory: ${d}",
("d", chain_config->state_dir.generic_string()));

auto block_log_chain_id = block_log::extract_chain_id(blocks_dir, retained_dir);

Expand Down

0 comments on commit d6b6b67

Please sign in to comment.