From: Matt Corallo Date: Tue, 13 Apr 2021 20:04:17 +0000 (-0400) Subject: Loosen background-persister so bindings are happy X-Git-Tag: v0.0.14~23^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=f223d2a72e1d0e44694db94eba25386d23ff8667;p=rust-lightning Loosen background-persister so bindings are happy --- diff --git a/background-processor/src/lib.rs b/background-processor/src/lib.rs index 30d9f6c50..120305446 100644 --- a/background-processor/src/lib.rs +++ b/background-processor/src/lib.rs @@ -20,6 +20,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::thread; use std::thread::JoinHandle; use std::time::{Duration, Instant}; +use std::ops::Deref; /// BackgroundProcessor takes care of tasks that (1) need to happen periodically to keep /// Rust-Lightning running properly, and (2) either can or should be run in the background. Its @@ -66,25 +67,29 @@ impl BackgroundProcessor { /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager /// [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable /// [`FilesystemPersister::persist_manager`]: lightning_persister::FilesystemPersister::persist_manager - pub fn start( - persist_channel_manager: PM, - channel_manager: Arc, Arc, Arc, Arc, Arc>>, - peer_manager: Arc, Arc, Arc>>, logger: Arc, - ) -> Self - where + pub fn start< + PM, Signer, + M: 'static + Deref + Send + Sync, + T: 'static + Deref + Send + Sync, + K: 'static + Deref + Send + Sync, + F: 'static + Deref + Send + Sync, + L: 'static + Deref + Send + Sync, + Descriptor: 'static + SocketDescriptor + Send + Sync, + CM: 'static + Deref + Send + Sync, + RM: 'static + Deref + Send + Sync + >( + persist_channel_manager: PM, channel_manager: Arc>, + peer_manager: Arc>, logger: L, + ) -> Self where Signer: 'static + Sign, - M: 'static + chain::Watch, - T: 'static + BroadcasterInterface, - K: 'static + KeysInterface, - F: 'static + FeeEstimator, - L: 'static + Logger, - CM: 'static + ChannelMessageHandler, - RM: 'static + RoutingMessageHandler, - PM: 'static - + Send - + Fn( - &ChannelManager, Arc, Arc, Arc, Arc>, - ) -> Result<(), std::io::Error>, + M::Target: 'static + chain::Watch, + T::Target: 'static + BroadcasterInterface, + K::Target: 'static + KeysInterface, + F::Target: 'static + FeeEstimator, + L::Target: 'static + Logger, + CM::Target: 'static + ChannelMessageHandler, + RM::Target: 'static + RoutingMessageHandler, + PM: 'static + Send + Fn(&ChannelManager) -> Result<(), std::io::Error>, { let stop_thread = Arc::new(AtomicBool::new(false)); let stop_thread_clone = stop_thread.clone();