From: Matt Corallo Date: Mon, 12 Jun 2023 16:50:45 +0000 (+0000) Subject: Stop writing old `user_payment_id` field not read since 0.0.103 X-Git-Tag: v0.0.116-alpha1~9^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=942d77699ba4dc0d77087d418c63146c06fc3c44;p=rust-lightning 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. --- diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs index 76a7f884a..ff51bf7d3 100644 --- a/lightning/src/events/mod.rs +++ b/lightning/src/events/mod.rs @@ -855,7 +855,7 @@ impl Writeable for Event { (3, via_channel_id, option), (4, amount_msat, required), (5, via_user_channel_id, option), - (6, 0u64, required), // user_payment_id required for compatibility with 0.0.103 and earlier + // Type 6 was `user_payment_id` on 0.0.103 and earlier (7, claim_deadline, option), (8, payment_preimage, option), (9, onion_fields, option), @@ -1059,7 +1059,7 @@ impl MaybeReadable for Event { let mut payment_secret = None; let mut amount_msat = 0; let mut receiver_node_id = None; - let mut _user_payment_id = None::; // For compatibility with 0.0.103 and earlier + let mut _user_payment_id = None::; // Used in 0.0.103 and earlier, no longer written in 0.0.116+. let mut via_channel_id = None; let mut claim_deadline = None; let mut via_user_channel_id = None; diff --git a/pending_changelog/no-legacy-payments.txt b/pending_changelog/no-legacy-payments.txt index f5f3f1669..8ca3aef1c 100644 --- a/pending_changelog/no-legacy-payments.txt +++ b/pending_changelog/no-legacy-payments.txt @@ -1,4 +1,6 @@ * Legacy inbound payment creation has been removed, thus there is no way to create a pending inbound payment which will still be claimable on LDK 0.0.103 or earlier. Support for claiming such payments is still retained, - however is likely to be removed in the next release. + however is likely to be removed in the next release (#2351). + * Some fields required in 0.0.103 and earlier are no longer written, thus + deserializing objects written in 0.0.116 with 0.0.103 may now fail (#2351).