refactor!: move WalletChangeSet to bdk_wallet and fix import paths

This commit is contained in:
志宇
2024-07-17 14:37:10 +00:00
parent 6b43001951
commit eb73f0659e
24 changed files with 142 additions and 166 deletions

View File

@@ -7,7 +7,6 @@ edition = "2021"
[dependencies]
bdk_wallet = { path = "../../crates/wallet", features = ["file_store"] }
bdk_file_store = { path = "../../crates/file_store" }
bdk_bitcoind_rpc = { path = "../../crates/bitcoind_rpc" }
anyhow = "1"

View File

@@ -2,10 +2,10 @@ use bdk_bitcoind_rpc::{
bitcoincore_rpc::{Auth, Client, RpcApi},
Emitter,
};
use bdk_file_store::Store;
use bdk_wallet::{
bitcoin::{Block, Network, Transaction},
wallet::{CreateParams, LoadParams},
file_store::Store,
CreateParams, LoadParams,
};
use clap::{self, Parser};
use std::{path::PathBuf, sync::mpsc::sync_channel, thread::spawn, time::Instant};
@@ -86,10 +86,8 @@ fn main() -> anyhow::Result<()> {
);
let start_load_wallet = Instant::now();
let mut db = Store::<bdk_wallet::wallet::ChangeSet>::open_or_create_new(
DB_MAGIC.as_bytes(),
args.db_path,
)?;
let mut db =
Store::<bdk_wallet::ChangeSet>::open_or_create_new(DB_MAGIC.as_bytes(), args.db_path)?;
let load_params =
LoadParams::with_descriptors(&args.descriptor, &args.change_descriptor, args.network)?;