From: Alekos Filini Date: Tue, 25 Aug 2020 14:07:26 +0000 (+0200) Subject: Compact Filters blockchain implementation X-Git-Tag: 0.1.0-beta.1~10 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/total.html?a=commitdiff_plain;h=6cb44a6392fd4c9e6c89ff1e1b7b157b34f37936;p=bdk-cli Compact Filters blockchain implementation --- diff --git a/Cargo.toml b/Cargo.toml index 71af2de..91caadf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,13 +14,15 @@ serde_json = { version = "^1.0" } rand = "^0.7" # Optional dependencies -sled = { version = "0.31.0", optional = true } +sled = { version = "0.34", optional = true } electrum-client = { version = "0.2.0-beta.1", optional = true } reqwest = { version = "0.10", optional = true, features = ["json"] } futures = { version = "0.3", optional = true } clap = { version = "2.33", optional = true } base64 = { version = "^0.11", optional = true } async-trait = { version = "0.1", optional = true } +rocksdb = { version = "0.14", optional = true } +lazy_static = { version = "1.4", optional = true } # Platform-specific dependencies [target.'cfg(not(target_arch = "wasm32"))'.dependencies] @@ -36,6 +38,7 @@ compiler = ["clap", "miniscript/compiler"] default = ["key-value-db", "electrum"] electrum = ["electrum-client"] esplora = ["reqwest", "futures"] +compact_filters = ["rocksdb", "lazy_static"] key-value-db = ["sled"] cli-utils = ["clap", "base64"] async-interface = ["async-trait"] diff --git a/src/cli.rs b/src/cli.rs index 3da4d49..2b0c521 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -11,6 +11,7 @@ use bitcoin::hashes::hex::{FromHex, ToHex}; use bitcoin::util::psbt::PartiallySignedTransaction; use bitcoin::{Address, OutPoint, Txid}; +use crate::blockchain::log_progress; use crate::error::Error; use crate::types::ScriptType; use crate::{FeeRate, TxBuilder, Wallet}; @@ -344,7 +345,7 @@ where if let Some(_sub_matches) = matches.subcommand_matches("get_new_address") { Ok(Some(format!("{}", wallet.get_new_address()?))) } else if let Some(_sub_matches) = matches.subcommand_matches("sync") { - maybe_await!(wallet.sync(None))?; + maybe_await!(wallet.sync(log_progress(), None))?; Ok(None) } else if let Some(_sub_matches) = matches.subcommand_matches("list_unspent") { let mut res = String::new();