Skip to content

Commit 53ce26b

Browse files
committed
Update docs for slightly more clarity on channel key derivation
1 parent e4f690c commit 53ce26b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channel_keys.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ macro_rules! basepoint_impl {
5050
macro_rules! key_impl {
5151
($BasepointT:ty, $KeyName:expr) => {
5252
doc_comment! {
53-
concat!("Generate ", $KeyName, " using per_commitment_point"),
53+
concat!("Derive a public ", $KeyName, " using the `per_commitment_point` and countersignatory's `basepoint`"),
5454
pub fn from_basepoint<T: secp256k1::Signing>(
5555
secp_ctx: &Secp256k1<T>,
56-
basepoint: &$BasepointT,
56+
countersignatory_basepoint: &$BasepointT,
5757
per_commitment_point: &PublicKey,
5858
) -> Self {
59-
Self(derive_public_key(secp_ctx, per_commitment_point, &basepoint.0))
59+
Self(derive_public_key(secp_ctx, per_commitment_point, &countersignatory_basepoint.0))
6060
}
6161
}
6262

6363
doc_comment! {
64-
concat!("Generate ", $KeyName, " from privkey"),
64+
concat!("Build a ", $KeyName, " directly from an already-derived private key"),
6565
pub fn from_secret_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, sk: &SecretKey) -> Self {
6666
Self(PublicKey::from_secret_key(&secp_ctx, &sk))
6767
}

0 commit comments

Comments
 (0)