Starting a refactor into more functional modules

This commit is contained in:
Dave Hrycyszyn
2024-06-25 13:31:02 +01:00
parent d4809a48e6
commit 037fc27b7b
14 changed files with 54 additions and 21 deletions

View File

@@ -2,7 +2,7 @@ use std::path::PathBuf;
use config::SideNodeConfig;
use crate::{keys, utils};
use crate::{keys, utils, bitcoin};
pub(crate) mod config;
@@ -14,7 +14,7 @@ pub(crate) fn init(home: PathBuf, config: SideNodeConfig) -> Result<(), std::io:
keys::bft_crdt::write(&bft_crdt_key_path)?;
println!("Writing bitcoin key to: {:?}", bitcoin_key_path);
keys::bitcoin::write(&bitcoin_key_path)?;
bitcoin::bitcoin_keys::write(&bitcoin_key_path)?;
println!("Writing config to: {:?}", config_path);
config::write_toml(&config, &config_path).expect("unable to write config file");