@@ -1353,10 +1353,13 @@ pub enum Event {
1353
1353
/// Will be `None` for channels created prior to LDK version 0.0.122.
1354
1354
channel_type : Option < ChannelTypeFeatures > ,
1355
1355
} ,
1356
- /// Used to indicate that a channel with the given `channel_id` is ready to
1357
- /// be used. This event is emitted either when the funding transaction has been confirmed
1358
- /// on-chain, or, in case of a 0conf channel, when both parties have confirmed the channel
1359
- /// establishment.
1356
+ /// Used to indicate that a channel with the given `channel_id` is ready to be used. This event
1357
+ /// is emitted when
1358
+ /// - the initial funding transaction has been confirmed on-chain to an acceptable depth
1359
+ /// according to both parties (i.e., `channel_ready` messages were exchanged),
1360
+ /// - a splice funding transaction has been confirmed on-chain to an acceptable depth according
1361
+ /// to both parties (i.e., `splice_locked` messages were exchanged), or,
1362
+ /// - in case of a 0conf channel, when both parties have confirmed the channel establishment.
1360
1363
///
1361
1364
/// # Failure Behavior and Persistence
1362
1365
/// This event will eventually be replayed after failures-to-handle (i.e., the event handler
@@ -1375,6 +1378,11 @@ pub enum Event {
1375
1378
user_channel_id : u128 ,
1376
1379
/// The `node_id` of the channel counterparty.
1377
1380
counterparty_node_id : PublicKey ,
1381
+ /// The outpoint of the channel's funding transaction.
1382
+ ///
1383
+ /// Will be `None` if the channel's funding transaction reached an acceptable depth prior to
1384
+ /// version 0.2.
1385
+ funding_txo : Option < OutPoint > ,
1378
1386
/// The features that this channel will operate with.
1379
1387
channel_type : ChannelTypeFeatures ,
1380
1388
} ,
@@ -1926,11 +1934,13 @@ impl Writeable for Event {
1926
1934
ref channel_id,
1927
1935
ref user_channel_id,
1928
1936
ref counterparty_node_id,
1937
+ ref funding_txo,
1929
1938
ref channel_type,
1930
1939
} => {
1931
1940
29u8 . write ( writer) ?;
1932
1941
write_tlv_fields ! ( writer, {
1933
1942
( 0 , channel_id, required) ,
1943
+ ( 1 , funding_txo, option) ,
1934
1944
( 2 , user_channel_id, required) ,
1935
1945
( 4 , counterparty_node_id, required) ,
1936
1946
( 6 , channel_type, required) ,
@@ -2437,9 +2447,11 @@ impl MaybeReadable for Event {
2437
2447
let mut channel_id = ChannelId :: new_zero ( ) ;
2438
2448
let mut user_channel_id: u128 = 0 ;
2439
2449
let mut counterparty_node_id = RequiredWrapper ( None ) ;
2450
+ let mut funding_txo = None ;
2440
2451
let mut channel_type = RequiredWrapper ( None ) ;
2441
2452
read_tlv_fields ! ( reader, {
2442
2453
( 0 , channel_id, required) ,
2454
+ ( 1 , funding_txo, option) ,
2443
2455
( 2 , user_channel_id, required) ,
2444
2456
( 4 , counterparty_node_id, required) ,
2445
2457
( 6 , channel_type, required) ,
@@ -2449,6 +2461,7 @@ impl MaybeReadable for Event {
2449
2461
channel_id,
2450
2462
user_channel_id,
2451
2463
counterparty_node_id : counterparty_node_id. 0 . unwrap ( ) ,
2464
+ funding_txo,
2452
2465
channel_type : channel_type. 0 . unwrap ( ) ,
2453
2466
} ) )
2454
2467
} ;
0 commit comments