]> Untitled Git - bdk/commitdiff
Make Signer and AddressValidator Send and Sync
authorLLFourn <lloyd.fourn@gmail.com>
Tue, 3 Nov 2020 05:06:03 +0000 (16:06 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Tue, 3 Nov 2020 05:16:32 +0000 (16:16 +1100)
src/wallet/address_validator.rs
src/wallet/signer.rs

index 1a76feb93e06b4efb78d0f4e08154754a33d2f04..cb4087aab9a28ae45aea7cb5eca43d56c4e03a82 100644 (file)
@@ -106,7 +106,7 @@ impl std::error::Error for AddressValidatorError {}
 /// validator will be propagated up to the original caller that triggered the address generation.
 ///
 /// For a usage example see [this module](crate::address_validator)'s documentation.
-pub trait AddressValidator {
+pub trait AddressValidator: Send + Sync {
     /// Validate or inspect an address
     fn validate(
         &self,
index f0392a80374162f11fbbf08c5e138f1771835922..24f08aef2dbb05d46d5c0d5b7aa557be3e85ae05 100644 (file)
@@ -162,7 +162,7 @@ impl std::error::Error for SignerError {}
 ///
 /// This trait can be implemented to provide customized signers to the wallet. For an example see
 /// [`this module`](crate::wallet::signer)'s documentation.
-pub trait Signer: fmt::Debug {
+pub trait Signer: fmt::Debug + Send + Sync {
     /// Sign a PSBT
     ///
     /// The `input_index` argument is only provided if the wallet doesn't declare to sign the whole