This will append the wallet name provided via configuration flag to
bdk-cli into the data directory. So the current structure of datadir
is `~/.bdk-bitcoin/compact_filters/<wallet-name>.
This will let bdk-cli keep multiple wallet directories simultaneously.
}
fn open_database(wallet_opts: &WalletOpts) -> Tree {
- let database = sled::open(prepare_home_dir().to_str().unwrap()).unwrap();
+ let mut database_path = prepare_home_dir();
+ database_path.push(wallet_opts.wallet.clone());
+ let database = sled::open(database_path).unwrap();
let tree = database.open_tree(&wallet_opts.wallet).unwrap();
debug!("database opened successfully");
tree