Remove useless build warnings
[rust-lightning] / lightning / src / chain / keysinterface.rs
index 654ba71ef7d644245f3604ded5ab6975e94282bf..b7ef55ca7ec40312e5d868fc8ded33d544f1b662 100644 (file)
@@ -83,20 +83,13 @@ pub enum SpendableOutputDescriptor {
                /// The remote_revocation_pubkey used to derive witnessScript
                remote_revocation_pubkey: PublicKey
        },
-       // TODO: Note that because key is now static and exactly what is provided by us, we should drop
-       // this in favor of StaticOutput:
-       /// An output to a P2WPKH, spendable exclusively by the given private key.
+       /// An output to a P2WPKH, spendable exclusively by our payment key.
        /// The witness in the spending input, is, thus, simply:
        /// <BIP 143 signature> <payment key>
        ///
        /// These are generally the result of our counterparty having broadcast the current state,
        /// allowing us to claim the non-HTLC-encumbered outputs immediately.
-       ///
-       /// To derive the payment key corresponding to the channel state, you must pass the
-       /// channel's payment_base_key and the provided per_commitment_point to
-       /// chan_utils::derive_private_key. The resulting key should be used to sign the spending
-       /// transaction.
-       DynamicOutputP2WPKH {
+       StaticOutputRemotePayment {
                /// The outpoint which is spendable
                outpoint: OutPoint,
                /// The output which is reference by the given outpoint
@@ -125,7 +118,7 @@ impl Writeable for SpendableOutputDescriptor {
                                key_derivation_params.1.write(writer)?;
                                remote_revocation_pubkey.write(writer)?;
                        },
-                       &SpendableOutputDescriptor::DynamicOutputP2WPKH { ref outpoint, ref output, ref key_derivation_params } => {
+                       &SpendableOutputDescriptor::StaticOutputRemotePayment { ref outpoint, ref output, ref key_derivation_params } => {
                                2u8.write(writer)?;
                                outpoint.write(writer)?;
                                output.write(writer)?;
@@ -152,7 +145,7 @@ impl Readable for SpendableOutputDescriptor {
                                key_derivation_params: (Readable::read(reader)?, Readable::read(reader)?),
                                remote_revocation_pubkey: Readable::read(reader)?,
                        }),
-                       2u8 => Ok(SpendableOutputDescriptor::DynamicOutputP2WPKH {
+                       2u8 => Ok(SpendableOutputDescriptor::StaticOutputRemotePayment {
                                outpoint: Readable::read(reader)?,
                                output: Readable::read(reader)?,
                                key_derivation_params: (Readable::read(reader)?, Readable::read(reader)?),