@@ -715,6 +715,10 @@ pub enum Event {
715715 SpendableOutputs {
716716 /// The outputs which you should store as spendable by you.
717717 outputs : Vec < SpendableOutputDescriptor > ,
718+ /// The `channel_id` indicating which channel the spendable outputs belong to.
719+ ///
720+ /// This will always be `Some` for events generated by LDK versions 0.0.117 and above.
721+ channel_id : Option < [ u8 ; 32 ] > ,
718722 } ,
719723 /// This event is generated when a payment has been successfully forwarded through us and a
720724 /// forwarding fee earned.
@@ -1000,10 +1004,11 @@ impl Writeable for Event {
10001004 // Note that we now ignore these on the read end as we'll re-generate them in
10011005 // ChannelManager, we write them here only for backwards compatibility.
10021006 } ,
1003- & Event :: SpendableOutputs { ref outputs } => {
1007+ & Event :: SpendableOutputs { ref outputs, channel_id } => {
10041008 5u8 . write ( writer) ?;
10051009 write_tlv_fields ! ( writer, {
10061010 ( 0 , WithoutLength ( outputs) , required) ,
1011+ ( 1 , channel_id, option) ,
10071012 } ) ;
10081013 } ,
10091014 & Event :: HTLCIntercepted { requested_next_hop_scid, payment_hash, inbound_amount_msat, expected_outbound_amount_msat, intercept_id } => {
@@ -1274,10 +1279,12 @@ impl MaybeReadable for Event {
12741279 5u8 => {
12751280 let f = || {
12761281 let mut outputs = WithoutLength ( Vec :: new ( ) ) ;
1282+ let mut channel_id: Option < [ u8 ; 32 ] > = None ;
12771283 read_tlv_fields ! ( reader, {
12781284 ( 0 , outputs, required) ,
1285+ ( 1 , channel_id, option) ,
12791286 } ) ;
1280- Ok ( Some ( Event :: SpendableOutputs { outputs : outputs. 0 } ) )
1287+ Ok ( Some ( Event :: SpendableOutputs { outputs : outputs. 0 , channel_id } ) )
12811288 } ;
12821289 f ( )
12831290 } ,
0 commit comments