From: Matt Corallo Date: Tue, 18 Jul 2023 19:04:56 +0000 (+0000) Subject: Tweak generics on `derive_channel_signer` to be bindings-compatible X-Git-Tag: v0.0.116~4^2~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=1e119a2d6a7d798a231a042c055e2d7e5e0fb73d;p=rust-lightning Tweak generics on `derive_channel_signer` to be bindings-compatible The C bindings generation currently has issues looking through a generic associated type. While this should be fixed in the bindings generator, its easy to fix here for now and we can revisit it later. --- diff --git a/lightning/src/events/bump_transaction.rs b/lightning/src/events/bump_transaction.rs index bf56a84ca..e56035b56 100644 --- a/lightning/src/events/bump_transaction.rs +++ b/lightning/src/events/bump_transaction.rs @@ -26,7 +26,7 @@ use crate::ln::chan_utils::{ use crate::ln::features::ChannelTypeFeatures; use crate::ln::PaymentPreimage; use crate::prelude::*; -use crate::sign::{ChannelSigner, EcdsaChannelSigner, SignerProvider}; +use crate::sign::{ChannelSigner, EcdsaChannelSigner, SignerProvider, WriteableEcdsaChannelSigner}; use crate::sync::Mutex; use crate::util::logger::Logger; @@ -102,9 +102,9 @@ impl AnchorDescriptor { } /// Derives the channel signer required to sign the anchor input. - pub fn derive_channel_signer(&self, signer_provider: &SP) -> ::Signer + pub fn derive_channel_signer(&self, signer_provider: &SP) -> S where - SP::Target: SignerProvider + SP::Target: SignerProvider { let mut signer = signer_provider.derive_channel_signer( self.channel_derivation_parameters.value_satoshis, @@ -211,9 +211,9 @@ impl HTLCDescriptor { } /// Derives the channel signer required to sign the HTLC input. - pub fn derive_channel_signer(&self, signer_provider: &SP) -> ::Signer + pub fn derive_channel_signer(&self, signer_provider: &SP) -> S where - SP::Target: SignerProvider + SP::Target: SignerProvider { let mut signer = signer_provider.derive_channel_signer( self.channel_derivation_parameters.value_satoshis,