@@ -1184,6 +1184,16 @@ pub enum Event {
1184
1184
/// caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for
1185
1185
/// events generated or serialized by versions prior to 0.0.122.
1186
1186
next_user_channel_id : Option < u128 > ,
1187
+ /// The node id of the previous node.
1188
+ ///
1189
+ /// This is only `None` for HTLCs received prior to 0.1 or for events serialized by
1190
+ /// versions prior to 0.1
1191
+ prev_node_id : Option < PublicKey > ,
1192
+ /// The node id of the next node.
1193
+ ///
1194
+ /// This is only `None` for HTLCs received prior to 0.1 or for events serialized by
1195
+ /// versions prior to 0.1
1196
+ next_node_id : Option < PublicKey > ,
1187
1197
/// The total fee, in milli-satoshis, which was earned as a result of the payment.
1188
1198
///
1189
1199
/// Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
@@ -1601,8 +1611,8 @@ impl Writeable for Event {
1601
1611
}
1602
1612
& Event :: PaymentForwarded {
1603
1613
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,
1614
+ prev_node_id , next_node_id , total_fee_earned_msat , skimmed_fee_msat ,
1615
+ claim_from_onchain_tx , outbound_amount_forwarded_msat,
1606
1616
} => {
1607
1617
7u8 . write ( writer) ?;
1608
1618
write_tlv_fields ! ( writer, {
@@ -1614,6 +1624,8 @@ impl Writeable for Event {
1614
1624
( 7 , skimmed_fee_msat, option) ,
1615
1625
( 9 , prev_user_channel_id, option) ,
1616
1626
( 11 , next_user_channel_id, option) ,
1627
+ ( 13 , prev_node_id, option) ,
1628
+ ( 15 , next_node_id, option) ,
1617
1629
} ) ;
1618
1630
} ,
1619
1631
& Event :: ChannelClosed { ref channel_id, ref user_channel_id, ref reason,
@@ -1981,6 +1993,8 @@ impl MaybeReadable for Event {
1981
1993
let mut next_channel_id = None ;
1982
1994
let mut prev_user_channel_id = None ;
1983
1995
let mut next_user_channel_id = None ;
1996
+ let mut prev_node_id = None ;
1997
+ let mut next_node_id = None ;
1984
1998
let mut total_fee_earned_msat = None ;
1985
1999
let mut skimmed_fee_msat = None ;
1986
2000
let mut claim_from_onchain_tx = false ;
@@ -1994,11 +2008,14 @@ impl MaybeReadable for Event {
1994
2008
( 7 , skimmed_fee_msat, option) ,
1995
2009
( 9 , prev_user_channel_id, option) ,
1996
2010
( 11 , next_user_channel_id, option) ,
2011
+ ( 13 , prev_node_id, option) ,
2012
+ ( 15 , next_node_id, option) ,
1997
2013
} ) ;
1998
2014
Ok ( Some ( Event :: PaymentForwarded {
1999
2015
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,
2016
+ next_user_channel_id, prev_node_id, next_node_id,
2017
+ total_fee_earned_msat, skimmed_fee_msat, claim_from_onchain_tx,
2018
+ outbound_amount_forwarded_msat,
2002
2019
} ) )
2003
2020
} ;
2004
2021
f ( )
0 commit comments