Skip to content

Commit 942d776

Browse files
committed
Stop writing old user_payment_id field not read since 0.0.103
Since we're breaking downgrade compatibility to LDK version 0.0.103 and before, we might as well go ahead and remove other code we have for compatibility.
1 parent 6535627 commit 942d776

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lightning/src/events/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ impl Writeable for Event {
855855
(3, via_channel_id, option),
856856
(4, amount_msat, required),
857857
(5, via_user_channel_id, option),
858-
(6, 0u64, required), // user_payment_id required for compatibility with 0.0.103 and earlier
858+
// Type 6 was `user_payment_id` on 0.0.103 and earlier
859859
(7, claim_deadline, option),
860860
(8, payment_preimage, option),
861861
(9, onion_fields, option),
@@ -1059,7 +1059,7 @@ impl MaybeReadable for Event {
10591059
let mut payment_secret = None;
10601060
let mut amount_msat = 0;
10611061
let mut receiver_node_id = None;
1062-
let mut _user_payment_id = None::<u64>; // For compatibility with 0.0.103 and earlier
1062+
let mut _user_payment_id = None::<u64>; // Used in 0.0.103 and earlier, no longer written in 0.0.116+.
10631063
let mut via_channel_id = None;
10641064
let mut claim_deadline = None;
10651065
let mut via_user_channel_id = None;
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
* Legacy inbound payment creation has been removed, thus there is no way to
22
create a pending inbound payment which will still be claimable on LDK
33
0.0.103 or earlier. Support for claiming such payments is still retained,
4-
however is likely to be removed in the next release.
4+
however is likely to be removed in the next release (#2351).
5+
* Some fields required in 0.0.103 and earlier are no longer written, thus
6+
deserializing objects written in 0.0.116 with 0.0.103 may now fail (#2351).

0 commit comments

Comments
 (0)