@@ -25,6 +25,8 @@ use crate::ln::types::ChannelId;
2525use crate :: sign:: ecdsa:: EcdsaChannelSigner ;
2626use crate :: sign:: HTLCDescriptor ;
2727
28+ use core:: ops:: Deref ;
29+
2830#[ allow( unused_imports) ]
2931use crate :: prelude:: * ;
3032
@@ -346,6 +348,28 @@ pub trait Watch<ChannelSigner: EcdsaChannelSigner> {
346348 ) -> Vec < ( OutPoint , ChannelId , Vec < MonitorEvent > , PublicKey ) > ;
347349}
348350
351+ impl < ChannelSigner : EcdsaChannelSigner , T : Watch < ChannelSigner > + ?Sized , W : Deref < Target = T > >
352+ Watch < ChannelSigner > for W
353+ {
354+ fn watch_channel (
355+ & self , channel_id : ChannelId , monitor : ChannelMonitor < ChannelSigner > ,
356+ ) -> Result < ChannelMonitorUpdateStatus , ( ) > {
357+ self . deref ( ) . watch_channel ( channel_id, monitor)
358+ }
359+
360+ fn update_channel (
361+ & self , channel_id : ChannelId , update : & ChannelMonitorUpdate ,
362+ ) -> ChannelMonitorUpdateStatus {
363+ self . deref ( ) . update_channel ( channel_id, update)
364+ }
365+
366+ fn release_pending_monitor_events (
367+ & self ,
368+ ) -> Vec < ( OutPoint , ChannelId , Vec < MonitorEvent > , PublicKey ) > {
369+ self . deref ( ) . release_pending_monitor_events ( )
370+ }
371+ }
372+
349373/// The `Filter` trait defines behavior for indicating chain activity of interest pertaining to
350374/// channels.
351375///
0 commit comments