]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Introduce `InboundV1Channel` & `OutboundV1Channel`
authorDuncan Dean <duncangleeddean@gmail.com>
Wed, 5 Apr 2023 11:43:02 +0000 (13:43 +0200)
committerDuncan Dean <git@dunxen.dev>
Thu, 15 Jun 2023 10:51:34 +0000 (12:51 +0200)
lightning/src/ln/channel.rs

index c313a879b09310645906ab86e83c45efba02a9e1..3c22bdad430868a7561d9bf2cea5accb846029af 100644 (file)
@@ -6437,6 +6437,26 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
        }
 }
 
+/// A not-yet-funded outbound (from holder) channel using V1 channel establishment.
+pub(super) struct OutboundV1Channel<Signer: ChannelSigner> {
+       #[cfg(not(test))]
+       context: ChannelContext<Signer>,
+       #[cfg(test)]
+       pub context: ChannelContext<Signer>,
+}
+
+impl<Signer: WriteableEcdsaChannelSigner> OutboundV1Channel<Signer> {}
+
+/// A not-yet-funded inbound (from counterparty) channel using V1 channel establishment.
+pub(super) struct InboundV1Channel<Signer: ChannelSigner> {
+       #[cfg(not(test))]
+       context: ChannelContext<Signer>,
+       #[cfg(test)]
+       pub context: ChannelContext<Signer>,
+}
+
+impl<Signer: WriteableEcdsaChannelSigner> InboundV1Channel<Signer> {}
+
 const SERIALIZATION_VERSION: u8 = 3;
 const MIN_SERIALIZATION_VERSION: u8 = 2;