2 use lightning::chain::{chainmonitor, channelmonitor};
3 use lightning::chain::chainmonitor::MonitorUpdateId;
4 use lightning::chain::transaction::OutPoint;
5 use lightning::util::test_channel_signer::TestChannelSigner;
9 pub struct TestPersister {
10 pub update_ret: Mutex<chain::ChannelMonitorUpdateStatus>,
12 impl chainmonitor::Persist<TestChannelSigner> for TestPersister {
13 fn persist_new_channel(&self, _funding_txo: OutPoint, _data: &channelmonitor::ChannelMonitor<TestChannelSigner>, _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<TestChannelSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
18 self.update_ret.lock().unwrap().clone()