@@ -1184,6 +1184,14 @@ pub enum Event {
11841184 /// caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for
11851185 /// events generated or serialized by versions prior to 0.0.122.
11861186 next_user_channel_id : Option < u128 > ,
1187+ /// The node id of the previous node.
1188+ ///
1189+ /// This is only `None` for events generated or serialized by versions prior to 0.1
1190+ prev_node_id : Option < PublicKey > ,
1191+ /// The node id of the next node.
1192+ ///
1193+ /// This is only `None` for events generated or serialized by versions prior to 0.1
1194+ next_node_id : Option < PublicKey > ,
11871195 /// The total fee, in milli-satoshis, which was earned as a result of the payment.
11881196 ///
11891197 /// Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
@@ -1601,8 +1609,8 @@ impl Writeable for Event {
16011609 }
16021610 & Event :: PaymentForwarded {
16031611 prev_channel_id, next_channel_id, prev_user_channel_id, next_user_channel_id,
1604- total_fee_earned_msat , skimmed_fee_msat , claim_from_onchain_tx ,
1605- outbound_amount_forwarded_msat,
1612+ prev_node_id , next_node_id , total_fee_earned_msat , skimmed_fee_msat ,
1613+ claim_from_onchain_tx , outbound_amount_forwarded_msat,
16061614 } => {
16071615 7u8 . write ( writer) ?;
16081616 write_tlv_fields ! ( writer, {
@@ -1614,6 +1622,8 @@ impl Writeable for Event {
16141622 ( 7 , skimmed_fee_msat, option) ,
16151623 ( 9 , prev_user_channel_id, option) ,
16161624 ( 11 , next_user_channel_id, option) ,
1625+ ( 13 , prev_node_id, option) ,
1626+ ( 15 , next_node_id, option) ,
16171627 } ) ;
16181628 } ,
16191629 & Event :: ChannelClosed { ref channel_id, ref user_channel_id, ref reason,
@@ -1981,6 +1991,8 @@ impl MaybeReadable for Event {
19811991 let mut next_channel_id = None ;
19821992 let mut prev_user_channel_id = None ;
19831993 let mut next_user_channel_id = None ;
1994+ let mut prev_node_id = None ;
1995+ let mut next_node_id = None ;
19841996 let mut total_fee_earned_msat = None ;
19851997 let mut skimmed_fee_msat = None ;
19861998 let mut claim_from_onchain_tx = false ;
@@ -1994,11 +2006,14 @@ impl MaybeReadable for Event {
19942006 ( 7 , skimmed_fee_msat, option) ,
19952007 ( 9 , prev_user_channel_id, option) ,
19962008 ( 11 , next_user_channel_id, option) ,
2009+ ( 13 , prev_node_id, option) ,
2010+ ( 15 , next_node_id, option) ,
19972011 } ) ;
19982012 Ok ( Some ( Event :: PaymentForwarded {
19992013 prev_channel_id, next_channel_id, prev_user_channel_id,
2000- next_user_channel_id, total_fee_earned_msat, skimmed_fee_msat,
2001- claim_from_onchain_tx, outbound_amount_forwarded_msat,
2014+ next_user_channel_id, prev_node_id, next_node_id,
2015+ total_fee_earned_msat, skimmed_fee_msat, claim_from_onchain_tx,
2016+ outbound_amount_forwarded_msat,
20022017 } ) )
20032018 } ;
20042019 f ( )
0 commit comments