]> git.bitcoin.ninja Git - rust-lightning/blobdiff - lightning-persister/src/lib.rs
Use ChannelSigner instead of ChanSigner for type parameters
[rust-lightning] / lightning-persister / src / lib.rs
index 218366e7de4edea752a1d01258fa660e24d53479..6f414a09f8df80f8fc7b83b73fc24f691fb30890 100644 (file)
@@ -51,7 +51,7 @@ impl<Signer: Sign> DiskWriteable for ChannelMonitor<Signer> {
 }
 
 impl<Signer: Sign, M, T, K, F, L> DiskWriteable for ChannelManager<Signer, Arc<M>, Arc<T>, Arc<K>, Arc<F>, Arc<L>>
-where M: chain::Watch<ChanSigner=Signer>,
+where M: chain::Watch<Signer>,
       T: BroadcasterInterface,
       K: KeysInterface<Signer=Signer>,
       F: FeeEstimator,
@@ -82,7 +82,7 @@ impl FilesystemPersister {
                manager: &ChannelManager<Signer, Arc<M>, Arc<T>, Arc<K>, Arc<F>, Arc<L>>
        ) -> Result<(), std::io::Error>
        where Signer: Sign,
-             M: chain::Watch<ChanSigner=Signer>,
+             M: chain::Watch<Signer>,
              T: BroadcasterInterface,
              K: KeysInterface<Signer=Signer>,
              F: FeeEstimator,
@@ -126,14 +126,14 @@ impl FilesystemPersister {
        }
 }
 
-impl<ChanSigner: Sign + Send + Sync> channelmonitor::Persist<ChanSigner> for FilesystemPersister {
-       fn persist_new_channel(&self, funding_txo: OutPoint, monitor: &ChannelMonitor<ChanSigner>) -> Result<(), ChannelMonitorUpdateErr> {
+impl<ChannelSigner: Sign + Send + Sync> channelmonitor::Persist<ChannelSigner> for FilesystemPersister {
+       fn persist_new_channel(&self, funding_txo: OutPoint, monitor: &ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr> {
                let filename = format!("{}_{}", funding_txo.txid.to_hex(), funding_txo.index);
                util::write_to_file(self.path_to_channel_data.clone(), filename, monitor)
                  .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure)
        }
 
-       fn update_persisted_channel(&self, funding_txo: OutPoint, _update: &ChannelMonitorUpdate, monitor: &ChannelMonitor<ChanSigner>) -> Result<(), ChannelMonitorUpdateErr> {
+       fn update_persisted_channel(&self, funding_txo: OutPoint, _update: &ChannelMonitorUpdate, monitor: &ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr> {
                let filename = format!("{}_{}", funding_txo.txid.to_hex(), funding_txo.index);
                util::write_to_file(self.path_to_channel_data.clone(), filename, monitor)
                  .map_err(|_| ChannelMonitorUpdateErr::PermanentFailure)