From bc273a293949df9e749bca4ee1d07fa20ffd8fa0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 27 Nov 2023 18:32:08 +0000 Subject: [PATCH] Update docs for slightly more clarity on channel key derivation --- lightning/src/ln/channel_keys.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lightning/src/ln/channel_keys.rs b/lightning/src/ln/channel_keys.rs index 3ea9ac01a..fbb0162e9 100644 --- a/lightning/src/ln/channel_keys.rs +++ b/lightning/src/ln/channel_keys.rs @@ -50,18 +50,18 @@ macro_rules! basepoint_impl { macro_rules! key_impl { ($BasepointT:ty, $KeyName:expr) => { doc_comment! { - concat!("Generate ", $KeyName, " using per_commitment_point"), + concat!("Derive a public ", $KeyName, " using one node's `per_commitment_point` and its countersignatory's `basepoint`"), pub fn from_basepoint( secp_ctx: &Secp256k1, - basepoint: &$BasepointT, + countersignatory_basepoint: &$BasepointT, per_commitment_point: &PublicKey, ) -> Self { - Self(derive_public_key(secp_ctx, per_commitment_point, &basepoint.0)) + Self(derive_public_key(secp_ctx, per_commitment_point, &countersignatory_basepoint.0)) } } doc_comment! { - concat!("Generate ", $KeyName, " from privkey"), + concat!("Build a ", $KeyName, " directly from an already-derived private key"), pub fn from_secret_key(secp_ctx: &Secp256k1, sk: &SecretKey) -> Self { Self(PublicKey::from_secret_key(&secp_ctx, &sk)) } -- 2.39.5