From 30b4b43846eb9225f2d38c162a3d026f10c0390c Mon Sep 17 00:00:00 2001 From: Leo Nash Date: Mon, 2 Dec 2024 19:32:04 +0000 Subject: [PATCH] move counterparty payment script to default channelsigner --- lightning/src/sign/mod.rs | 9 +++------ lightning/src/util/test_channel_signer.rs | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index 3faa566f055..cd280381166 100644 --- a/lightning/src/sign/mod.rs +++ b/lightning/src/sign/mod.rs @@ -741,7 +741,9 @@ pub trait ChannelSigner { /// Document this next fn get_counterparty_payment_script( &self, channel_type_features: &ChannelTypeFeatures, payment_key: &PublicKey, - ) -> ScriptBuf; + ) -> ScriptBuf { + chan_utils::get_counterparty_payment_script(channel_type_features, payment_key) + } /// Gets the per-commitment point for a specific commitment number /// /// Note that the commitment number starts at `(1 << 48) - 1` and counts backwards. @@ -1337,11 +1339,6 @@ impl EntropySource for InMemorySigner { } impl ChannelSigner for InMemorySigner { - fn get_counterparty_payment_script( - &self, channel_type_features: &ChannelTypeFeatures, payment_key: &PublicKey, - ) -> ScriptBuf { - chan_utils::get_counterparty_payment_script(channel_type_features, payment_key) - } fn get_per_commitment_point( &self, idx: u64, secp_ctx: &Secp256k1, ) -> Result { diff --git a/lightning/src/util/test_channel_signer.rs b/lightning/src/util/test_channel_signer.rs index 4a9122d9858..b40f897d211 100644 --- a/lightning/src/util/test_channel_signer.rs +++ b/lightning/src/util/test_channel_signer.rs @@ -165,9 +165,6 @@ impl TestChannelSigner { } impl ChannelSigner for TestChannelSigner { - fn get_counterparty_payment_script(&self, channel_type_features: &ChannelTypeFeatures, payment_key: &PublicKey) -> ScriptBuf { - chan_utils::get_counterparty_payment_script(channel_type_features, payment_key) - } fn get_per_commitment_point(&self, idx: u64, secp_ctx: &Secp256k1) -> Result { #[cfg(test)] if !self.is_signer_available(SignerOp::GetPerCommitmentPoint) {