]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Make `Channel` and `ChannelManager` less particular about their `Signer` type.
authorArik Sosman <git@arik.io>
Fri, 20 Jan 2023 00:41:15 +0000 (16:41 -0800)
committerArik Sosman <git@arik.io>
Mon, 23 Jan 2023 23:48:39 +0000 (15:48 -0800)
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs

index 185fd59bafaf1a3ec4c4be9fca8e50630e1b34b3..d9ec57d5a7e773c410640c8be4e47b1d96a9a482 100644 (file)
@@ -498,7 +498,7 @@ pub(crate) const EXPIRE_PREV_CONFIG_TICKS: usize = 5;
 //
 // Holder designates channel data owned for the benefice of the user client.
 // Counterparty designates channel data owned by the another channel participant entity.
-pub(super) struct Channel<Signer: WriteableEcdsaChannelSigner> {
+pub(super) struct Channel<Signer: ChannelSigner> {
        config: LegacyChannelConfig,
 
        // Track the previous `ChannelConfig` so that we can continue forwarding HTLCs that were
index 03707e7493369aa1d9367bd3e947313a7b4a55cb..82640ad15f16c4a324a4880c04b33aa55525b926 100644 (file)
@@ -55,7 +55,7 @@ use crate::ln::msgs::{ChannelMessageHandler, DecodeError, LightningError, MAX_VA
 use crate::ln::outbound_payment;
 use crate::ln::outbound_payment::{OutboundPayments, PendingOutboundPayment};
 use crate::ln::wire::Encode;
-use crate::chain::keysinterface::{EntropySource, KeysManager, NodeSigner, Recipient, WriteableEcdsaChannelSigner, SignerProvider};
+use crate::chain::keysinterface::{EntropySource, KeysManager, NodeSigner, Recipient, SignerProvider, ChannelSigner};
 use crate::util::config::{UserConfig, ChannelConfig};
 use crate::util::events::{Event, EventHandler, EventsProvider, MessageSendEvent, MessageSendEventsProvider, ClosureReason, HTLCDestination};
 use crate::util::events;
@@ -452,7 +452,7 @@ pub(crate) enum MonitorUpdateCompletionAction {
 }
 
 /// State we hold per-peer.
-pub(super) struct PeerState<Signer: WriteableEcdsaChannelSigner> {
+pub(super) struct PeerState<Signer: ChannelSigner> {
        /// `temporary_channel_id` or `channel_id` -> `channel`.
        ///
        /// Holds all channels where the peer is the counterparty. Once a channel has been assigned a