@@ -845,6 +845,10 @@ pub enum Event {
845
845
counterparty_node_id : PublicKey ,
846
846
/// The outpoint of the channel's funding transaction.
847
847
funding_txo : OutPoint ,
848
+ /// The features that this channel will operate with.
849
+ ///
850
+ /// Will be `None` for channels created prior to LDK version 0.0.122.
851
+ channel_type : Option < ChannelTypeFeatures > ,
848
852
} ,
849
853
/// Used to indicate that a channel with the given `channel_id` is ready to
850
854
/// be used. This event is emitted either when the funding transaction has been confirmed
@@ -1214,10 +1218,14 @@ impl Writeable for Event {
1214
1218
( 6 , channel_type, required) ,
1215
1219
} ) ;
1216
1220
} ,
1217
- & Event :: ChannelPending { ref channel_id, ref user_channel_id, ref former_temporary_channel_id, ref counterparty_node_id, ref funding_txo } => {
1221
+ & Event :: ChannelPending { ref channel_id, ref user_channel_id,
1222
+ ref former_temporary_channel_id, ref counterparty_node_id, ref funding_txo,
1223
+ ref channel_type
1224
+ } => {
1218
1225
31u8 . write ( writer) ?;
1219
1226
write_tlv_fields ! ( writer, {
1220
1227
( 0 , channel_id, required) ,
1228
+ ( 1 , channel_type, option) ,
1221
1229
( 2 , user_channel_id, required) ,
1222
1230
( 4 , former_temporary_channel_id, required) ,
1223
1231
( 6 , counterparty_node_id, required) ,
@@ -1606,8 +1614,10 @@ impl MaybeReadable for Event {
1606
1614
let mut former_temporary_channel_id = None ;
1607
1615
let mut counterparty_node_id = RequiredWrapper ( None ) ;
1608
1616
let mut funding_txo = RequiredWrapper ( None ) ;
1617
+ let mut channel_type = None ;
1609
1618
read_tlv_fields ! ( reader, {
1610
1619
( 0 , channel_id, required) ,
1620
+ ( 1 , channel_type, option) ,
1611
1621
( 2 , user_channel_id, required) ,
1612
1622
( 4 , former_temporary_channel_id, required) ,
1613
1623
( 6 , counterparty_node_id, required) ,
@@ -1619,7 +1629,8 @@ impl MaybeReadable for Event {
1619
1629
user_channel_id,
1620
1630
former_temporary_channel_id,
1621
1631
counterparty_node_id : counterparty_node_id. 0 . unwrap ( ) ,
1622
- funding_txo : funding_txo. 0 . unwrap ( )
1632
+ funding_txo : funding_txo. 0 . unwrap ( ) ,
1633
+ channel_type,
1623
1634
} ) )
1624
1635
} ;
1625
1636
f ( )
0 commit comments