2 use lightning::chain::{chainmonitor, channelmonitor};
3 use lightning::chain::chainmonitor::MonitorUpdateId;
4 use lightning::chain::transaction::OutPoint;
5 use lightning::util::enforcing_trait_impls::EnforcingSigner;
9 pub struct TestPersister {
10 pub update_ret: Mutex<chain::ChannelMonitorUpdateStatus>,
12 impl chainmonitor::Persist<EnforcingSigner> for TestPersister {
13 fn persist_new_channel(&self, _funding_txo: OutPoint, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
14 self.update_ret.lock().unwrap().clone()
17 fn update_persisted_channel(&self, _funding_txo: OutPoint, _update: Option<&channelmonitor::ChannelMonitorUpdate>, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
18 self.update_ret.lock().unwrap().clone()