Skip to content

Commit ec6fabd

Browse files
committed
Clarify docs on provide_channel_parameters
Its very confusing to say that LDK will call `provide_channel_parameters` more than once - its true for a channel, but not for a given instance. Instead, phrase the docs with reference to a specific instance, which is much clearer.
1 parent 5588eeb commit ec6fabd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lightning/src/chain/keysinterface.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,12 @@ pub trait BaseSign {
369369
-> Result<(Signature, Signature), ()>;
370370

371371
/// Set the counterparty static channel data, including basepoints,
372-
/// counterparty_selected/holder_selected_contest_delay and funding outpoint. Since these are
373-
/// static channel data, they MUST NOT be allowed to change to different values once set, as LDK
374-
/// may call this method more than once.
372+
/// counterparty_selected/holder_selected_contest_delay and funding outpoint.
373+
///
374+
/// This data is static, and will never change for a channel once set. For a given [`BaseSign`]
375+
/// instance, LDK will call this method exactly once - either immediately after construction
376+
/// (including if done via [`KeysInterface::read_chan_signer`]) or when the funding information
377+
/// has been generated.
375378
///
376379
/// channel_parameters.is_populated() MUST be true.
377380
fn provide_channel_parameters(&mut self, channel_parameters: &ChannelTransactionParameters);

0 commit comments

Comments
 (0)