@@ -341,8 +341,10 @@ pub trait KeysInterface: Send + Sync {
341
341
}
342
342
343
343
#[ derive( Clone ) ]
344
- /// Holds late-bound channel data
345
- /// This data is available after the remote accepts the channel.
344
+ /// Holds late-bound channel data.
345
+ /// This data is available after the channel is known to be accepted, either
346
+ /// when receiving an open_channel for an inbound channel or when
347
+ /// receiving accept_channel for an outbound channel.
346
348
pub struct AcceptedChannelData {
347
349
/// Remote public keys and base points
348
350
pub ( crate ) remote_channel_pubkeys : ChannelPublicKeys ,
@@ -424,15 +426,15 @@ impl InMemoryChannelKeys {
424
426
}
425
427
426
428
/// Remote pubkeys
427
- /// Will panic if the remote pubkeys were not set with on_accept
429
+ /// Will panic if on_accept wasn't called
428
430
pub fn remote_pubkeys ( & self ) -> & ChannelPublicKeys { & self . accepted_channel_data . as_ref ( ) . unwrap ( ) . remote_channel_pubkeys }
429
431
430
432
/// Remote to-self delay, constraining local commitment txs
431
- /// Will panic if the remote pubkeys were not set with on_accept
433
+ /// Will panic if on_accept wasn't called
432
434
pub fn remote_to_self_delay ( & self ) -> u16 { self . accepted_channel_data . as_ref ( ) . unwrap ( ) . remote_to_self_delay }
433
435
434
436
/// Local to-self delay, constraining remote commitment txs
435
- /// Will panic if the remote pubkeys were not set with on_accept
437
+ /// Will panic if on_accept wasn't called
436
438
pub fn local_to_self_delay ( & self ) -> u16 { self . accepted_channel_data . as_ref ( ) . unwrap ( ) . local_to_self_delay }
437
439
}
438
440
0 commit comments