Correct docs on `generate_channel_keys` 2022-12-1867-followups
authorMatt Corallo <git@bluematt.me>
Tue, 13 Dec 2022 21:41:49 +0000 (21:41 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Dec 2022 21:41:49 +0000 (21:41 +0000)
03de0598afd032e9fd5dbbaca0aabc6a367ce4f5 appeared to revert updated
docs due to a rebase error. This reverts the docs on
`generate_channel_keys` to the state they were in prior to that
commit, with one additional doc.

lightning/src/chain/keysinterface.rs

index c0488d11c29b6374bfb171024992f5011832b5a9..dc46880d1489bb59afbef131de551feae9b68c26 100644 (file)
@@ -473,8 +473,10 @@ pub trait KeysInterface {
        /// This method should return a different value each time it is called, to avoid linking
        /// on-chain funds across channels as controlled to the same user.
        fn get_shutdown_scriptpubkey(&self) -> ShutdownScript;
-       /// Get a new set of [`Sign`] for per-channel secrets. These MUST be unique even if you
-       /// restarted with some stale data!
+       /// Generates a unique `channel_keys_id` that can be used to obtain a [`Self::Signer`] through
+       /// [`KeysInterface::derive_channel_signer`]. The `user_channel_id` is provided to allow
+       /// implementations of [`KeysInterface`] to maintain a mapping between it and the generated
+       /// `channel_keys_id`.
        ///
        /// This method must return a different value each time it is called.
        fn generate_channel_keys_id(&self, inbound: bool, channel_value_satoshis: u64, user_channel_id: u128) -> [u8; 32];