]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Implement Persist for any Signer in TestPersister
authorMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 23:51:15 +0000 (19:51 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 23:53:56 +0000 (19:53 -0400)
lightning/src/util/test_utils.rs

index 2d3f930a0e425776a7bd0a24f5c595353ed86130..153f2f28eed11ffe7e55536c98c191714edb6443 100644 (file)
@@ -186,12 +186,12 @@ impl TestPersister {
                *self.update_ret.lock().unwrap() = ret;
        }
 }
-impl channelmonitor::Persist<EnforcingSigner> for TestPersister {
-       fn persist_new_channel(&self, _funding_txo: OutPoint, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>) -> Result<(), channelmonitor::ChannelMonitorUpdateErr> {
+impl<Signer: keysinterface::Sign> channelmonitor::Persist<Signer> for TestPersister {
+       fn persist_new_channel(&self, _funding_txo: OutPoint, _data: &channelmonitor::ChannelMonitor<Signer>) -> Result<(), channelmonitor::ChannelMonitorUpdateErr> {
                self.update_ret.lock().unwrap().clone()
        }
 
-       fn update_persisted_channel(&self, _funding_txo: OutPoint, _update: &channelmonitor::ChannelMonitorUpdate, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>) -> Result<(), channelmonitor::ChannelMonitorUpdateErr> {
+       fn update_persisted_channel(&self, _funding_txo: OutPoint, _update: &channelmonitor::ChannelMonitorUpdate, _data: &channelmonitor::ChannelMonitor<Signer>) -> Result<(), channelmonitor::ChannelMonitorUpdateErr> {
                self.update_ret.lock().unwrap().clone()
        }
 }