]> Untitled Git - bdk-cli/commitdiff
Compact Filters blockchain implementation
authorAlekos Filini <alekos.filini@gmail.com>
Tue, 25 Aug 2020 14:07:26 +0000 (16:07 +0200)
committerAlekos Filini <alekos.filini@gmail.com>
Sun, 30 Aug 2020 15:23:33 +0000 (17:23 +0200)
Cargo.toml
src/cli.rs

index 71af2deafbcea02b656c6ab843ea597c117e0bd6..91caadf9a747a7dd623d3ac22d65849644531c0e 100644 (file)
@@ -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"]
index 3da4d49e9134b0c2c2328b86ac9403e3fb2f610c..2b0c5210b7b85d8d2d4eda0a77f12dbc02a4c056 100644 (file)
@@ -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();