diff --git a/zcash_client_backend/src/data_api/chain.rs b/zcash_client_backend/src/data_api/chain.rs index f458bc8b2a..b70fa5e485 100644 --- a/zcash_client_backend/src/data_api/chain.rs +++ b/zcash_client_backend/src/data_api/chain.rs @@ -591,7 +591,7 @@ where ParamsT: consensus::Parameters + Send + 'static, BlockSourceT: BlockSource, DbT: WalletWrite, - ::AccountId: ConditionallySelectable + Default + Send + 'static, + ::AccountId: ConditionallySelectable + Default + Send + Sync + 'static, { assert_eq!(from_height, from_state.block_height + 1); diff --git a/zcash_client_backend/src/scanning.rs b/zcash_client_backend/src/scanning.rs index 78db76aefb..4a8abadbad 100644 --- a/zcash_client_backend/src/scanning.rs +++ b/zcash_client_backend/src/scanning.rs @@ -52,7 +52,7 @@ use std::marker::PhantomData; /// [`CompactSaplingOutput`]: crate::proto::compact_formats::CompactSaplingOutput /// [`CompactOrchardAction`]: crate::proto::compact_formats::CompactOrchardAction /// [`scan_block`]: crate::scanning::scan_block -pub trait ScanningKeyOps { +pub trait ScanningKeyOps: Send + Sync { /// Prepare the key for use in batch trial decryption. fn prepare(&self) -> D::IncomingViewingKey; @@ -72,8 +72,8 @@ pub trait ScanningKeyOps { fn nf(&self, note: &D::Note, note_position: Position) -> Option; } -impl> ScanningKeyOps - for &K +impl + Send + Sync> + ScanningKeyOps for &K { fn prepare(&self) -> D::IncomingViewingKey { (*self).prepare() @@ -120,7 +120,7 @@ pub struct ScanningKey { key_scope: Option, } -impl ScanningKeyOps +impl ScanningKeyOps for ScanningKey { fn prepare(&self) -> sapling::note_encryption::PreparedIncomingViewingKey { @@ -140,7 +140,7 @@ impl ScanningKeyOps } } -impl ScanningKeyOps +impl ScanningKeyOps for (AccountId, SaplingIvk) { fn prepare(&self) -> sapling::note_encryption::PreparedIncomingViewingKey { @@ -161,7 +161,7 @@ impl ScanningKeyOps } #[cfg(feature = "orchard")] -impl ScanningKeyOps +impl ScanningKeyOps for ScanningKey { fn prepare(&self) -> orchard::keys::PreparedIncomingViewingKey { @@ -241,7 +241,9 @@ impl ScanningKeys { } } -impl ScanningKeys { +impl + ScanningKeys +{ /// Constructs a [`ScanningKeys`] from an iterator of [`UnifiedFullViewingKey`]s, /// along with the account identifiers corresponding to those UFVKs. pub fn from_account_ufvks( diff --git a/zcash_client_backend/src/sync.rs b/zcash_client_backend/src/sync.rs index b7b0f88e52..0387303a6e 100644 --- a/zcash_client_backend/src/sync.rs +++ b/zcash_client_backend/src/sync.rs @@ -58,7 +58,7 @@ where CaT: BlockCache, CaT::Error: std::error::Error + Send + Sync + 'static, DbT: WalletWrite + WalletCommitmentTrees, - DbT::AccountId: ConditionallySelectable + Default + Send + 'static, + DbT::AccountId: ConditionallySelectable + Default + Send + Sync + 'static, ::Error: std::error::Error + Send + Sync + 'static, ::Error: std::error::Error + Send + Sync + 'static, { @@ -87,7 +87,7 @@ where CaT: BlockCache, CaT::Error: std::error::Error + Send + Sync + 'static, DbT: WalletWrite, - DbT::AccountId: ConditionallySelectable + Default + Send + 'static, + DbT::AccountId: ConditionallySelectable + Default + Send + Sync + 'static, DbT::Error: std::error::Error + Send + Sync + 'static, { // 3) Download chain tip metadata from lightwalletd @@ -363,7 +363,7 @@ where CaT: BlockCache, CaT::Error: std::error::Error + Send + Sync + 'static, DbT: WalletWrite, - DbT::AccountId: ConditionallySelectable + Default + Send + 'static, + DbT::AccountId: ConditionallySelectable + Default + Send + Sync + 'static, DbT::Error: std::error::Error + Send + Sync + 'static, { info!("Scanning {}", scan_range);