Skip to content

Commit 6ec23aa

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 d4dc05b commit 6ec23aa

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
@@ -395,9 +395,12 @@ pub trait BaseSign {
395395
fn sign_channel_announcement(&self, msg: &UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>)
396396
-> Result<(Signature, Signature), ()>;
397397
/// Set the counterparty static channel data, including basepoints,
398-
/// `counterparty_selected`/`holder_selected_contest_delay` and funding outpoint. Since these
399-
/// are static channel data, they MUST NOT be allowed to change to different values once set,
400-
/// as LDK may call this method more than once.
398+
/// `counterparty_selected`/`holder_selected_contest_delay` and funding outpoint.
399+
///
400+
/// This data is static, and will never change for a channel once set. For a given [`BaseSign`]
401+
/// instance, LDK will call this method exactly once - either immediately after construction
402+
/// (not including if done via [`KeysInterface::read_chan_signer`]) or when the funding
403+
/// information has been generated.
401404
///
402405
/// channel_parameters.is_populated() MUST be true.
403406
fn provide_channel_parameters(&mut self, channel_parameters: &ChannelTransactionParameters);

0 commit comments

Comments
 (0)