Split up generic parameters that used to comprise KeysInterface.
[rust-lightning] / lightning-block-sync / src / init.rs
index 72a6ec4b0c429aa39f54e1a77a93ff0efbbc2523..2807bc877694c42b827d22a80cb2f17ce621edd0 100644 (file)
@@ -61,18 +61,22 @@ BlockSourceResult<ValidatedBlockHeader> where B::Target: BlockSource {
 ///
 /// async fn init_sync<
 ///    B: BlockSource,
-///    K: EntropySource + NodeSigner + SignerProvider,
+///    ES: EntropySource,
+///    NS: NodeSigner,
+///    SP: SignerProvider,
 ///    T: BroadcasterInterface,
 ///    F: FeeEstimator,
 ///    R: Router,
 ///    L: Logger,
 ///    C: chain::Filter,
-///    P: chainmonitor::Persist<K::Signer>,
+///    P: chainmonitor::Persist<SP::Signer>,
 /// >(
 ///    block_source: &B,
-///    chain_monitor: &ChainMonitor<K::Signer, &C, &T, &F, &L, &P>,
+///    chain_monitor: &ChainMonitor<SP::Signer, &C, &T, &F, &L, &P>,
 ///    config: UserConfig,
-///    keys_manager: &K,
+///    entropy_source: &ES,
+///    node_signer: &NS,
+///    signer_provider: &SP,
 ///    tx_broadcaster: &T,
 ///    fee_estimator: &F,
 ///    router: &R,
@@ -81,14 +85,16 @@ BlockSourceResult<ValidatedBlockHeader> where B::Target: BlockSource {
 /// ) {
 ///    // Read a serialized channel monitor paired with the block hash when it was persisted.
 ///    let serialized_monitor = "...";
-///    let (monitor_block_hash, mut monitor) = <(BlockHash, ChannelMonitor<K::Signer>)>::read(
-///            &mut Cursor::new(&serialized_monitor), keys_manager).unwrap();
+///    let (monitor_block_hash, mut monitor) = <(BlockHash, ChannelMonitor<SP::Signer>)>::read(
+///            &mut Cursor::new(&serialized_monitor), (entropy_source, signer_provider)).unwrap();
 ///
 ///    // Read the channel manager paired with the block hash when it was persisted.
 ///    let serialized_manager = "...";
 ///    let (manager_block_hash, mut manager) = {
 ///            let read_args = ChannelManagerReadArgs::new(
-///                    keys_manager,
+///                    entropy_source,
+///                    node_signer,
+///                    signer_provider,
 ///                    fee_estimator,
 ///                    chain_monitor,
 ///                    tx_broadcaster,
@@ -97,7 +103,7 @@ BlockSourceResult<ValidatedBlockHeader> where B::Target: BlockSource {
 ///                    config,
 ///                    vec![&mut monitor],
 ///            );
-///            <(BlockHash, ChannelManager<&ChainMonitor<K::Signer, &C, &T, &F, &L, &P>, &T, &K, &F, &R, &L>)>::read(
+///            <(BlockHash, ChannelManager<&ChainMonitor<SP::Signer, &C, &T, &F, &L, &P>, &T, &ES, &NS, &SP, &F, &R, &L>)>::read(
 ///                    &mut Cursor::new(&serialized_manager), read_args).unwrap()
 ///    };
 ///