@@ -165,8 +165,8 @@ pub trait Persist<ChannelSigner: EcdsaChannelSigner> {
165
165
fn archive_persisted_channel ( & self , channel_funding_outpoint : OutPoint ) ;
166
166
}
167
167
168
- struct MonitorHolder < ChannelSigner : EcdsaChannelSigner > {
169
- monitor : ChannelMonitor < ChannelSigner > ,
168
+ pub ( crate ) struct MonitorHolder < ChannelSigner : EcdsaChannelSigner > {
169
+ pub ( crate ) monitor : ChannelMonitor < ChannelSigner > ,
170
170
/// The full set of pending monitor updates for this Channel.
171
171
///
172
172
/// Note that this lock must be held from [`ChannelMonitor::update_monitor`] through to
@@ -181,7 +181,7 @@ struct MonitorHolder<ChannelSigner: EcdsaChannelSigner> {
181
181
/// could cause users to have a full [`ChannelMonitor`] on disk as well as a
182
182
/// [`ChannelMonitorUpdate`] which was already applied. While this isn't an issue for the
183
183
/// LDK-provided update-based [`Persist`], it is somewhat surprising for users so we avoid it.
184
- pending_monitor_updates : Mutex < Vec < u64 > > ,
184
+ pub ( crate ) pending_monitor_updates : Mutex < Vec < u64 > > ,
185
185
}
186
186
187
187
impl < ChannelSigner : EcdsaChannelSigner > MonitorHolder < ChannelSigner > {
@@ -195,8 +195,8 @@ impl<ChannelSigner: EcdsaChannelSigner> MonitorHolder<ChannelSigner> {
195
195
/// Note that this holds a mutex in [`ChainMonitor`] and may block other events until it is
196
196
/// released.
197
197
pub struct LockedChannelMonitor < ' a , ChannelSigner : EcdsaChannelSigner > {
198
- lock : RwLockReadGuard < ' a , HashMap < OutPoint , MonitorHolder < ChannelSigner > > > ,
199
- funding_txo : OutPoint ,
198
+ pub ( crate ) lock : RwLockReadGuard < ' a , HashMap < OutPoint , MonitorHolder < ChannelSigner > > > ,
199
+ pub ( crate ) funding_txo : OutPoint ,
200
200
}
201
201
202
202
impl < ChannelSigner : EcdsaChannelSigner > Deref for LockedChannelMonitor < ' _ , ChannelSigner > {
@@ -750,17 +750,6 @@ where C::Target: chain::Filter,
750
750
L :: Target : Logger ,
751
751
P :: Target : Persist < ChannelSigner > ,
752
752
{
753
- fn get_stub_cids_with_counterparty ( & self , counterparty_node_id : PublicKey ) -> Vec < ChannelId > {
754
- let stub_monitors = self . stub_monitors . read ( ) . unwrap ( ) ;
755
- let mut stubs = vec ! [ ] ;
756
- for ( _, mon) in stub_monitors. iter ( ) {
757
- if mon. get_counterparty_node_id ( ) == Some ( counterparty_node_id) {
758
- stubs. push ( mon. channel_id ( ) ) ;
759
- }
760
- }
761
- stubs
762
- }
763
-
764
753
fn watch_channel ( & self , funding_outpoint : OutPoint , monitor : ChannelMonitor < ChannelSigner > ) -> Result < ChannelMonitorUpdateStatus , ( ) > {
765
754
let logger = WithChannelMonitor :: from ( & self . logger , & monitor, None ) ;
766
755
let mut monitors = self . monitors . write ( ) . unwrap ( ) ;
0 commit comments