diff --git a/Cargo.lock b/Cargo.lock index 0a4abdc..fb1182f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -490,7 +490,7 @@ dependencies = [ [[package]] name = "bp-wallet" version = "0.11.0-beta.8" -source = "git+https://github.com/BP-WG/bp-wallet?branch=develop#65588b519cc91778350065564ae4db5eff34f72b" +source = "git+https://github.com/BP-WG/bp-wallet?branch=develop#68debe9c6929227bee81b72428c3e8b5fbb18ed7" dependencies = [ "amplify", "base64", @@ -1126,7 +1126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] diff --git a/src/indexers/any.rs b/src/indexers/any.rs index 08b3b7f..a97da9d 100644 --- a/src/indexers/any.rs +++ b/src/indexers/any.rs @@ -22,6 +22,7 @@ // limitations under the License. use std::collections::HashMap; +use std::sync::Arc; use bp::Tx; use bpstd::Network; @@ -44,7 +45,7 @@ pub trait RgbResolver: Send { #[derive(From)] #[non_exhaustive] pub struct AnyResolver { - inner: Box, + inner: Arc, terminal_txes: HashMap, } @@ -52,7 +53,7 @@ impl AnyResolver { #[cfg(feature = "electrum_blocking")] pub fn electrum_blocking(url: &str, config: Option) -> Result { Ok(AnyResolver { - inner: Box::new( + inner: Arc::new( electrum::Client::from_config(url, config.unwrap_or_default()) .map_err(|e| e.to_string())?, ), @@ -63,7 +64,7 @@ impl AnyResolver { #[cfg(feature = "esplora_blocking")] pub fn esplora_blocking(url: &str, config: Option) -> Result { Ok(AnyResolver { - inner: Box::new( + inner: Arc::new( esplora::BlockingClient::from_config(url, config.unwrap_or_default()) .map_err(|e| e.to_string())?, ), @@ -74,7 +75,7 @@ impl AnyResolver { #[cfg(feature = "mempool_blocking")] pub fn mempool_blocking(url: &str, config: Option) -> Result { Ok(AnyResolver { - inner: Box::new(super::mempool_blocking::MemPoolClient::new( + inner: Arc::new(super::mempool_blocking::MemPoolClient::new( url, config.unwrap_or_default(), )?),