X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fenforcing_trait_impls.rs;h=f3e94b55d07e73d2703456fe3fa8ebe19f64975e;hb=1b245da37041f0f7a3046ee01298880021927f2f;hp=1a9038a2f5dc1c3c2122e71f8f6a5b0d4e945782;hpb=ec1f3346c1642a693481172945b623b8198007e2;p=rust-lightning diff --git a/lightning/src/util/enforcing_trait_impls.rs b/lightning/src/util/enforcing_trait_impls.rs index 1a9038a2..f3e94b55 100644 --- a/lightning/src/util/enforcing_trait_impls.rs +++ b/lightning/src/util/enforcing_trait_impls.rs @@ -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) -> 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) - -> 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 + ) -> Result { + 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(&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(())