@@ -1900,6 +1900,26 @@ impl<'a, Signer: WriteableEcdsaChannelSigner + 'a> ChannelInterface<'a, Signer>
1900
1900
}
1901
1901
}
1902
1902
1903
+ impl < ' a , Signer : WriteableEcdsaChannelSigner + ' a > ChannelInterface < ' a , Signer > for OutboundV1Channel < Signer > {
1904
+ fn get_context ( & ' a self ) -> & ' a ChannelContext < Signer > {
1905
+ & self . context
1906
+ }
1907
+
1908
+ fn get_context_mut ( & ' a mut self ) -> & ' a mut ChannelContext < Signer > {
1909
+ & mut self . context
1910
+ }
1911
+ }
1912
+
1913
+ impl < ' a , Signer : WriteableEcdsaChannelSigner + ' a > ChannelInterface < ' a , Signer > for InboundV1Channel < Signer > {
1914
+ fn get_context ( & ' a self ) -> & ' a ChannelContext < Signer > {
1915
+ & self . context
1916
+ }
1917
+
1918
+ fn get_context_mut ( & ' a mut self ) -> & ' a mut ChannelContext < Signer > {
1919
+ & mut self . context
1920
+ }
1921
+ }
1922
+
1903
1923
// TODO: We should refactor this to be an Inbound/OutboundChannel until initial setup handshaking
1904
1924
// has been completed, and then turn into a Channel to get compiler-time enforcement of things like
1905
1925
// calling channel_id() before we're set up or things like get_outbound_funding_signed on an
@@ -6489,6 +6509,26 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
6489
6509
}
6490
6510
}
6491
6511
6512
+ // A not-yet-funded outbound (from holder) channel using V1 channel establishment.
6513
+ pub ( super ) struct OutboundV1Channel < Signer : ChannelSigner > {
6514
+ #[ cfg( not( test) ) ]
6515
+ context : ChannelContext < Signer > ,
6516
+ #[ cfg( test) ]
6517
+ pub context : ChannelContext < Signer > ,
6518
+ }
6519
+
6520
+ impl < Signer : WriteableEcdsaChannelSigner > OutboundV1Channel < Signer > { }
6521
+
6522
+ // A not-yet-funded inbound (from counterparty) channel using V1 channel establishment.
6523
+ pub ( super ) struct InboundV1Channel < Signer : ChannelSigner > {
6524
+ #[ cfg( not( test) ) ]
6525
+ context : ChannelContext < Signer > ,
6526
+ #[ cfg( test) ]
6527
+ pub context : ChannelContext < Signer > ,
6528
+ }
6529
+
6530
+ impl < Signer : WriteableEcdsaChannelSigner > InboundV1Channel < Signer > { }
6531
+
6492
6532
const SERIALIZATION_VERSION : u8 = 3 ;
6493
6533
const MIN_SERIALIZATION_VERSION : u8 = 2 ;
6494
6534
0 commit comments