Rename `BaseSign` to `EcdsaChannelSigner`.
[rust-lightning] / lightning / src / util / enforcing_trait_impls.rs
index 1a9038a2f5dc1c3c2122e71f8f6a5b0d4e945782..f3e94b55d07e73d2703456fe3fa8ebe19f64975e 100644 (file)
@@ -10,7 +10,7 @@
 use crate::ln::channel::{ANCHOR_OUTPUT_VALUE_SATOSHI, MIN_CHAN_DUST_LIMIT_SATOSHIS};
 use crate::ln::chan_utils::{HTLCOutputInCommitment, ChannelPublicKeys, HolderCommitmentTransaction, CommitmentTransaction, ChannelTransactionParameters, TrustedCommitmentTransaction, ClosingTransaction};
 use crate::ln::{chan_utils, msgs, PaymentPreimage};
-use crate::chain::keysinterface::{Sign, InMemorySigner, BaseSign};
+use crate::chain::keysinterface::{Sign, InMemorySigner, EcdsaChannelSigner};
 
 use crate::prelude::*;
 use core::cmp;
@@ -90,7 +90,7 @@ impl EnforcingSigner {
        }
 }
 
-impl BaseSign for EnforcingSigner {
+impl EcdsaChannelSigner for EnforcingSigner {
        fn get_per_commitment_point(&self, idx: u64, secp_ctx: &Secp256k1<secp256k1::All>) -> PublicKey {
                self.inner.get_per_commitment_point(idx, secp_ctx)
        }
@@ -223,9 +223,10 @@ impl BaseSign for EnforcingSigner {
                self.inner.sign_holder_anchor_input(anchor_tx, input, secp_ctx)
        }
 
-       fn sign_channel_announcement(&self, msg: &msgs::UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>)
-       -> Result<(Signature, Signature), ()> {
-               self.inner.sign_channel_announcement(msg, secp_ctx)
+       fn sign_channel_announcement_with_funding_key(
+               &self, msg: &msgs::UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>
+       ) -> Result<Signature, ()> {
+               self.inner.sign_channel_announcement_with_funding_key(msg, secp_ctx)
        }
 
        fn provide_channel_parameters(&mut self, channel_parameters: &ChannelTransactionParameters) {
@@ -239,7 +240,7 @@ impl Writeable for EnforcingSigner {
        fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error> {
                // EnforcingSigner has two fields - `inner` ([`InMemorySigner`]) and `state`
                // ([`EnforcementState`]). `inner` is serialized here and deserialized by
-               // [`KeysInterface::read_chan_signer`]. `state` is managed by [`KeysInterface`]
+               // [`SignerProvider::read_chan_signer`]. `state` is managed by [`SignerProvider`]
                // and will be serialized as needed by the implementation of that trait.
                self.inner.write(writer)?;
                Ok(())