@@ -859,7 +859,7 @@ pub enum Event {
859
859
/// The `(channel_id, user_channel_id)` pairs over which the payment was received.
860
860
///
861
861
/// This will be an incomplete vector for MPP payment events created/serialized using LDK version 0.1.0 and prior.
862
- via_channel_ids : Vec < ( ChannelId , Option < u128 > ) > ,
862
+ receiving_channel_ids : Vec < ( ChannelId , Option < u128 > ) > ,
863
863
/// The block height at which this payment will be failed back and will no longer be
864
864
/// eligible for claiming.
865
865
///
@@ -1708,7 +1708,7 @@ impl Writeable for Event {
1708
1708
counterparty_skimmed_fee_msat,
1709
1709
ref purpose,
1710
1710
ref receiver_node_id,
1711
- ref via_channel_ids ,
1711
+ ref receiving_channel_ids ,
1712
1712
ref claim_deadline,
1713
1713
ref onion_fields,
1714
1714
ref payment_id,
@@ -1753,30 +1753,31 @@ impl Writeable for Event {
1753
1753
Some ( counterparty_skimmed_fee_msat)
1754
1754
} ;
1755
1755
1756
- let ( via_channel_id_legacy , via_user_channel_id_legacy ) =
1757
- match via_channel_ids . last ( ) {
1756
+ let ( receiving_channel_id_legacy , receiving_user_channel_id_legacy ) =
1757
+ match receiving_channel_ids . last ( ) {
1758
1758
Some ( ( chan_id, user_chan_id) ) => ( Some ( * chan_id) , * user_chan_id) ,
1759
1759
None => ( None , None ) ,
1760
1760
} ;
1761
1761
write_tlv_fields ! ( writer, {
1762
1762
( 0 , payment_hash, required) ,
1763
1763
( 1 , receiver_node_id, option) ,
1764
1764
( 2 , payment_secret, option) ,
1765
- // Marked as legacy in version 0.2.0; superseded by `via_channel_ids`, which
1766
- // includes all channel IDs used in the payment instead of only the last one.
1767
- ( 3 , via_channel_id_legacy, option) ,
1765
+ // Marked as legacy in version 0.2.0; superseded by `receiving_channel_ids`,
1766
+ // which includes all channel IDs used in the payment instead of only the last
1767
+ // one.
1768
+ ( 3 , receiving_channel_id_legacy, option) ,
1768
1769
( 4 , amount_msat, required) ,
1769
- // Marked as legacy in version 0.2.0 for the same reason as `via_channel_id_legacy`;
1770
- // superseded by `via_user_channel_ids `.
1771
- ( 5 , via_user_channel_id_legacy , option) ,
1770
+ // Marked as legacy in version 0.2.0 for the same reason as
1771
+ // `receiving_channel_id_legacy`; superseded by `receiving_channel_ids `.
1772
+ ( 5 , receiving_user_channel_id_legacy , option) ,
1772
1773
// Type 6 was `user_payment_id` on 0.0.103 and earlier
1773
1774
( 7 , claim_deadline, option) ,
1774
1775
( 8 , payment_preimage, option) ,
1775
1776
( 9 , onion_fields, option) ,
1776
1777
( 10 , skimmed_fee_opt, option) ,
1777
1778
( 11 , payment_context, option) ,
1778
1779
( 13 , payment_id, option) ,
1779
- ( 15 , * via_channel_ids , optional_vec) ,
1780
+ ( 15 , * receiving_channel_ids , optional_vec) ,
1780
1781
} ) ;
1781
1782
} ,
1782
1783
& Event :: PaymentSent {
@@ -2154,28 +2155,28 @@ impl MaybeReadable for Event {
2154
2155
let mut counterparty_skimmed_fee_msat_opt = None ;
2155
2156
let mut receiver_node_id = None ;
2156
2157
let mut _user_payment_id = None :: < u64 > ; // Used in 0.0.103 and earlier, no longer written in 0.0.116+.
2157
- let mut via_channel_id_legacy = None ;
2158
+ let mut receiving_channel_id_legacy = None ;
2158
2159
let mut claim_deadline = None ;
2159
- let mut via_user_channel_id_legacy = None ;
2160
+ let mut receiving_user_channel_id_legacy = None ;
2160
2161
let mut onion_fields = None ;
2161
2162
let mut payment_context = None ;
2162
2163
let mut payment_id = None ;
2163
- let mut via_channel_ids_opt = None ;
2164
+ let mut receiving_channel_ids_opt = None ;
2164
2165
read_tlv_fields ! ( reader, {
2165
2166
( 0 , payment_hash, required) ,
2166
2167
( 1 , receiver_node_id, option) ,
2167
2168
( 2 , payment_secret, option) ,
2168
- ( 3 , via_channel_id_legacy , option) ,
2169
+ ( 3 , receiving_channel_id_legacy , option) ,
2169
2170
( 4 , amount_msat, required) ,
2170
- ( 5 , via_user_channel_id_legacy , option) ,
2171
+ ( 5 , receiving_user_channel_id_legacy , option) ,
2171
2172
( 6 , _user_payment_id, option) ,
2172
2173
( 7 , claim_deadline, option) ,
2173
2174
( 8 , payment_preimage, option) ,
2174
2175
( 9 , onion_fields, option) ,
2175
2176
( 10 , counterparty_skimmed_fee_msat_opt, option) ,
2176
2177
( 11 , payment_context, option) ,
2177
2178
( 13 , payment_id, option) ,
2178
- ( 15 , via_channel_ids_opt , optional_vec) ,
2179
+ ( 15 , receiving_channel_ids_opt , optional_vec) ,
2179
2180
} ) ;
2180
2181
let purpose = match payment_secret {
2181
2182
Some ( secret) => {
@@ -2188,10 +2189,10 @@ impl MaybeReadable for Event {
2188
2189
None => return Err ( msgs:: DecodeError :: InvalidValue ) ,
2189
2190
} ;
2190
2191
2191
- let via_channel_ids = via_channel_ids_opt
2192
+ let receiving_channel_ids = receiving_channel_ids_opt
2192
2193
. or_else ( || {
2193
- via_channel_id_legacy
2194
- . map ( |chan_id| vec ! [ ( chan_id, via_user_channel_id_legacy ) ] )
2194
+ receiving_channel_id_legacy
2195
+ . map ( |chan_id| vec ! [ ( chan_id, receiving_user_channel_id_legacy ) ] )
2195
2196
} )
2196
2197
. unwrap_or_default ( ) ;
2197
2198
@@ -2202,7 +2203,7 @@ impl MaybeReadable for Event {
2202
2203
counterparty_skimmed_fee_msat : counterparty_skimmed_fee_msat_opt
2203
2204
. unwrap_or ( 0 ) ,
2204
2205
purpose,
2205
- via_channel_ids ,
2206
+ receiving_channel_ids ,
2206
2207
claim_deadline,
2207
2208
onion_fields,
2208
2209
payment_id,
0 commit comments