Skip to content

Commit

Permalink
snapshots: choose repository path according to user specified data-dir (
Browse files Browse the repository at this point in the history
  • Loading branch information
mriccobene authored Jun 25, 2023
1 parent 5c7c607 commit 47ed5ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion cmd/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ void add_option_chain(CLI::App& cli, uint64_t& network_id) {

void add_option_data_dir(CLI::App& cli, std::filesystem::path& data_dir) {
cli.add_option("--datadir", data_dir, "The path to the blockchain data directory")
->check(CLI::ExistingDirectory)
->default_val(DataDirectory::get_default_storage_path().string());
}

Expand Down
3 changes: 2 additions & 1 deletion cmd/silkworm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,12 @@ void parse_silkworm_command_line(CLI::App& cli, int argc, char* argv[], Silkworm
if (cli["--prune.c.before"]->count()) beforeCallTraces.emplace(cli["--prune.c.before"]->as<BlockNum>());

node_settings.prune_mode =
sw_db::parse_prune_mode(prune_mode, //
sw_db::parse_prune_mode(prune_mode,
olderHistory, olderReceipts, olderSenders, olderTxIndex, olderCallTraces, beforeHistory,
beforeReceipts, beforeSenders, beforeTxIndex, beforeCallTraces);

auto& snapshot_settings = node_settings.snapshot_settings;
snapshot_settings.repository_dir = node_settings.data_directory->snapshots().path();
snapshot_settings.bittorrent_settings.repository_path = snapshot_settings.repository_dir;
}

Expand Down

0 comments on commit 47ed5ee

Please sign in to comment.