Browse Source

Fixed db subdir

As the network name changed from `mainnet` to `bitcoin`, this change
accidentally affected database subdirectory. This would be
backwards-incompatible in a major way (the users would have to notice
the change and rename it).

This commit reverts the name of the subdirectory and renames the
variable to express the intent more explicitly.
master
Martin Habovstiak 5 years ago
parent
commit
2c50791dc5
  1. 6
      src/config.rs

6
src/config.rs

@ -150,13 +150,13 @@ impl Config {
let (mut config, _) = internal::Config::including_optional_config_files(configs).unwrap_or_exit();
let network_name = match config.network {
Network::Bitcoin => "bitcoin",
let db_subdir = match config.network {
Network::Bitcoin => "mainnet",
Network::Testnet => "testnet",
Network::Regtest => "regtest",
};
config.db_dir.push(network_name);
config.db_dir.push(db_subdir);
let default_daemon_port = match config.network {
Network::Bitcoin => 8332,

Loading…
Cancel
Save