]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Blinded paths: rename encrypted_tlvs_ss to *_rho for precision
authorValentine Wallace <vwallace@protonmail.com>
Tue, 1 Aug 2023 18:55:27 +0000 (11:55 -0700)
committerValentine Wallace <vwallace@protonmail.com>
Wed, 23 Aug 2023 15:28:42 +0000 (11:28 -0400)
The previous name can be confused for the shared secret that the rho is derived
from.

lightning/src/blinded_path/utils.rs

index e1feed97a27cb6277efc0201016f9bfa61267c68..c62b4e6c2612cb52ee57321b747947d2100bd214 100644 (file)
@@ -128,9 +128,9 @@ where
 }
 
 /// Encrypt TLV payload to be used as a [`crate::blinded_path::BlindedHop::encrypted_payload`].
-fn encrypt_payload<P: Writeable>(payload: P, encrypted_tlvs_ss: [u8; 32]) -> Vec<u8> {
+fn encrypt_payload<P: Writeable>(payload: P, encrypted_tlvs_rho: [u8; 32]) -> Vec<u8> {
        let mut writer = VecWriter(Vec::new());
-       let write_adapter = ChaChaPolyWriteAdapter::new(encrypted_tlvs_ss, &payload);
+       let write_adapter = ChaChaPolyWriteAdapter::new(encrypted_tlvs_rho, &payload);
        write_adapter.write(&mut writer).expect("In-memory writes cannot fail");
        writer.0
 }