From: Matt Corallo Date: Mon, 27 Nov 2023 18:32:08 +0000 (+0000) Subject: Update docs for slightly more clarity on channel key derivation X-Git-Tag: v0.0.120~14^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=bc273a293949df9e749bca4ee1d07fa20ffd8fa0;p=rust-lightning Update docs for slightly more clarity on channel key derivation --- 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)) }