@@ -326,11 +326,11 @@ const ERR: () = "You need at least 32 bit pointers (well, usize, but we'll assum
326
326
/// spam due to quick disconnection/reconnection, updates are not sent until the channel has been
327
327
/// offline for a full minute. In order to track this, you must call
328
328
/// timer_chan_freshness_every_min roughly once per minute, though it doesn't have to be perfec.
329
- pub struct ChannelManager < ' a , ChanSigner : ChannelKeys > {
329
+ pub struct ChannelManager < ChanSigner : ChannelKeys > {
330
330
default_configuration : UserConfig ,
331
331
genesis_hash : Sha256dHash ,
332
332
fee_estimator : Arc < FeeEstimator > ,
333
- monitor : Arc < ManyChannelMonitor + ' a > ,
333
+ monitor : Arc < ManyChannelMonitor > ,
334
334
tx_broadcaster : Arc < BroadcasterInterface > ,
335
335
336
336
#[ cfg( test) ]
@@ -583,7 +583,7 @@ macro_rules! maybe_break_monitor_err {
583
583
}
584
584
}
585
585
586
- impl < ' a , ChanSigner : ChannelKeys > ChannelManager < ' a , ChanSigner > {
586
+ impl < ChanSigner : ChannelKeys > ChannelManager < ChanSigner > {
587
587
/// Constructs a new ChannelManager to hold several channels and route between them.
588
588
///
589
589
/// This is the main "logic hub" for all channel-related actions, and implements
@@ -602,7 +602,7 @@ impl<'a, ChanSigner: ChannelKeys> ChannelManager<'a, ChanSigner> {
602
602
/// the ChannelManager as a listener to the BlockNotifier and call the BlockNotifier's
603
603
/// `block_(dis)connected` methods, which will notify all registered listeners in one
604
604
/// go.
605
- pub fn new ( network : Network , feeest : Arc < FeeEstimator > , monitor : Arc < ManyChannelMonitor + ' a > , tx_broadcaster : Arc < BroadcasterInterface > , logger : Arc < Logger > , keys_manager : Arc < KeysInterface < ChanKeySigner = ChanSigner > > , config : UserConfig , current_blockchain_height : usize ) -> Result < Arc < ChannelManager < ' a , ChanSigner > > , secp256k1:: Error > {
605
+ pub fn new ( network : Network , feeest : Arc < FeeEstimator > , monitor : Arc < ManyChannelMonitor > , tx_broadcaster : Arc < BroadcasterInterface > , logger : Arc < Logger > , keys_manager : Arc < KeysInterface < ChanKeySigner = ChanSigner > > , config : UserConfig , current_blockchain_height : usize ) -> Result < Arc < ChannelManager < ChanSigner > > , secp256k1:: Error > {
606
606
let secp_ctx = Secp256k1 :: new ( ) ;
607
607
608
608
let res = Arc :: new ( ChannelManager {
@@ -2567,7 +2567,7 @@ impl<'a, ChanSigner: ChannelKeys> ChannelManager<'a, ChanSigner> {
2567
2567
}
2568
2568
}
2569
2569
2570
- impl < ' a , ChanSigner : ChannelKeys > events:: MessageSendEventsProvider for ChannelManager < ' a , ChanSigner > {
2570
+ impl < ChanSigner : ChannelKeys > events:: MessageSendEventsProvider for ChannelManager < ChanSigner > {
2571
2571
fn get_and_clear_pending_msg_events ( & self ) -> Vec < events:: MessageSendEvent > {
2572
2572
// TODO: Event release to users and serialization is currently race-y: it's very easy for a
2573
2573
// user to serialize a ChannelManager with pending events in it and lose those events on
@@ -2592,7 +2592,7 @@ impl<'a, ChanSigner: ChannelKeys> events::MessageSendEventsProvider for ChannelM
2592
2592
}
2593
2593
}
2594
2594
2595
- impl < ' a , ChanSigner : ChannelKeys > events:: EventsProvider for ChannelManager < ' a , ChanSigner > {
2595
+ impl < ChanSigner : ChannelKeys > events:: EventsProvider for ChannelManager < ChanSigner > {
2596
2596
fn get_and_clear_pending_events ( & self ) -> Vec < events:: Event > {
2597
2597
// TODO: Event release to users and serialization is currently race-y: it's very easy for a
2598
2598
// user to serialize a ChannelManager with pending events in it and lose those events on
@@ -2617,7 +2617,7 @@ impl<'a, ChanSigner: ChannelKeys> events::EventsProvider for ChannelManager<'a,
2617
2617
}
2618
2618
}
2619
2619
2620
- impl < ' a , ChanSigner : ChannelKeys > ChainListener for ChannelManager < ' a , ChanSigner > {
2620
+ impl < ChanSigner : ChannelKeys > ChainListener for ChannelManager < ChanSigner > {
2621
2621
fn block_connected ( & self , header : & BlockHeader , height : u32 , txn_matched : & [ & Transaction ] , indexes_of_txn_matched : & [ u32 ] ) {
2622
2622
let header_hash = header. bitcoin_hash ( ) ;
2623
2623
log_trace ! ( self , "Block {} at height {} connected with {} txn matched" , header_hash, height, txn_matched. len( ) ) ;
@@ -2731,7 +2731,7 @@ impl<'a, ChanSigner: ChannelKeys> ChainListener for ChannelManager<'a, ChanSigne
2731
2731
}
2732
2732
}
2733
2733
2734
- impl < ' a , ChanSigner : ChannelKeys > ChannelMessageHandler for ChannelManager < ' a , ChanSigner > {
2734
+ impl < ChanSigner : ChannelKeys > ChannelMessageHandler for ChannelManager < ChanSigner > {
2735
2735
//TODO: Handle errors and close channel (or so)
2736
2736
fn handle_open_channel ( & self , their_node_id : & PublicKey , their_local_features : LocalFeatures , msg : & msgs:: OpenChannel ) -> Result < ( ) , LightningError > {
2737
2737
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
@@ -3116,7 +3116,7 @@ impl<R: ::std::io::Read> Readable<R> for HTLCForwardInfo {
3116
3116
}
3117
3117
}
3118
3118
3119
- impl < ' a , ChanSigner : ChannelKeys + Writeable > Writeable for ChannelManager < ' a , ChanSigner > {
3119
+ impl < ChanSigner : ChannelKeys + Writeable > Writeable for ChannelManager < ChanSigner > {
3120
3120
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , :: std:: io:: Error > {
3121
3121
let _ = self . total_consistency_lock . write ( ) . unwrap ( ) ;
3122
3122
@@ -3179,7 +3179,7 @@ impl<'a, ChanSigner: ChannelKeys + Writeable> Writeable for ChannelManager<'a, C
3179
3179
/// 5) Move the ChannelMonitors into your local ManyChannelMonitor.
3180
3180
/// 6) Disconnect/connect blocks on the ChannelManager.
3181
3181
/// 7) Register the new ChannelManager with your ChainWatchInterface.
3182
- pub struct ChannelManagerReadArgs < ' a , ' b , ChanSigner : ChannelKeys > {
3182
+ pub struct ChannelManagerReadArgs < ' a , ChanSigner : ChannelKeys > {
3183
3183
/// The keys provider which will give us relevant keys. Some keys will be loaded during
3184
3184
/// deserialization.
3185
3185
pub keys_manager : Arc < KeysInterface < ChanKeySigner = ChanSigner > > ,
@@ -3193,7 +3193,7 @@ pub struct ChannelManagerReadArgs<'a, 'b, ChanSigner: ChannelKeys> {
3193
3193
/// No calls to the ManyChannelMonitor will be made during deserialization. It is assumed that
3194
3194
/// you have deserialized ChannelMonitors separately and will add them to your
3195
3195
/// ManyChannelMonitor after deserializing this ChannelManager.
3196
- pub monitor : Arc < ManyChannelMonitor + ' b > ,
3196
+ pub monitor : Arc < ManyChannelMonitor > ,
3197
3197
3198
3198
/// The BroadcasterInterface which will be used in the ChannelManager in the future and may be
3199
3199
/// used to broadcast the latest local commitment transactions of channels which must be
@@ -3219,8 +3219,8 @@ pub struct ChannelManagerReadArgs<'a, 'b, ChanSigner: ChannelKeys> {
3219
3219
pub channel_monitors : & ' a HashMap < OutPoint , & ' a ChannelMonitor > ,
3220
3220
}
3221
3221
3222
- impl < ' a , ' b , R : :: std:: io:: Read , ChanSigner : ChannelKeys + Readable < R > > ReadableArgs < R , ChannelManagerReadArgs < ' a , ' b , ChanSigner > > for ( Sha256dHash , ChannelManager < ' b , ChanSigner > ) {
3223
- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ' b , ChanSigner > ) -> Result < Self , DecodeError > {
3222
+ impl < ' a , R : :: std:: io:: Read , ChanSigner : ChannelKeys + Readable < R > > ReadableArgs < R , ChannelManagerReadArgs < ' a , ChanSigner > > for ( Sha256dHash , ChannelManager < ChanSigner > ) {
3223
+ fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a , ChanSigner > ) -> Result < Self , DecodeError > {
3224
3224
let _ver: u8 = Readable :: read ( reader) ?;
3225
3225
let min_ver: u8 = Readable :: read ( reader) ?;
3226
3226
if min_ver > SERIALIZATION_VERSION {
0 commit comments