@@ -120,6 +120,16 @@ pub enum Event {
120120 /// This will be `None` if the payment was settled via an on-chain transaction. See the
121121 /// caveat described for the `total_fee_earned_msat` field.
122122 next_user_channel_id : Option < UserChannelId > ,
123+ /// The node id of the previous node.
124+ ///
125+ /// This is only `None` for HTLCs received prior to LDK Node v0.5 or for events serialized by
126+ /// versions prior to v0.5.
127+ prev_node_id : Option < PublicKey > ,
128+ /// The node id of the next node.
129+ ///
130+ /// This is only `None` for HTLCs received prior to LDK Node v0.5 or for events serialized by
131+ /// versions prior to v0.5.
132+ next_node_id : Option < PublicKey > ,
123133 /// The total fee, in milli-satoshis, which was earned as a result of the payment.
124134 ///
125135 /// Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
@@ -257,7 +267,9 @@ impl_writeable_tlv_based_enum!(Event,
257267 } ,
258268 ( 7 , PaymentForwarded ) => {
259269 ( 0 , prev_channel_id, required) ,
270+ ( 1 , prev_node_id, option) ,
260271 ( 2 , next_channel_id, required) ,
272+ ( 3 , next_node_id, option) ,
261273 ( 4 , prev_user_channel_id, option) ,
262274 ( 6 , next_user_channel_id, option) ,
263275 ( 8 , total_fee_earned_msat, option) ,
@@ -1139,6 +1151,8 @@ where
11391151 next_channel_id,
11401152 prev_user_channel_id,
11411153 next_user_channel_id,
1154+ prev_node_id,
1155+ next_node_id,
11421156 total_fee_earned_msat,
11431157 skimmed_fee_msat,
11441158 claim_from_onchain_tx,
@@ -1149,6 +1163,8 @@ where
11491163 next_channel_id : next_channel_id. expect ( "next_channel_id expected for events generated by LDK versions greater than 0.0.107." ) ,
11501164 prev_user_channel_id : prev_user_channel_id. map ( UserChannelId ) ,
11511165 next_user_channel_id : next_user_channel_id. map ( UserChannelId ) ,
1166+ prev_node_id,
1167+ next_node_id,
11521168 total_fee_earned_msat,
11531169 skimmed_fee_msat,
11541170 claim_from_onchain_tx,
0 commit comments