From: Valentine Wallace Date: Mon, 18 Mar 2024 21:01:07 +0000 (-0400) Subject: Make blinded hop features optional per spec. X-Git-Tag: v0.0.123-beta~38^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=18ebbf72446e8c45fdfc5ae73a1c3b55d8f97377;p=rust-lightning Make blinded hop features optional per spec. The spec states that if these features are missing, we MUST process the message as if it were present and contained an empty array. --- diff --git a/lightning/src/blinded_path/payment.rs b/lightning/src/blinded_path/payment.rs index d28066ec4..0ed09a366 100644 --- a/lightning/src/blinded_path/payment.rs +++ b/lightning/src/blinded_path/payment.rs @@ -169,7 +169,7 @@ impl Readable for BlindedPaymentTlvs { short_channel_id, payment_relay: payment_relay.ok_or(DecodeError::InvalidValue)?, payment_constraints: payment_constraints.0.unwrap(), - features: features.ok_or(DecodeError::InvalidValue)?, + features: features.unwrap_or_else(BlindedHopFeatures::empty), })) } else { if payment_relay.is_some() || features.is_some() { return Err(DecodeError::InvalidValue) } diff --git a/pending_changelog/blinded-hop-features-optional.txt b/pending_changelog/blinded-hop-features-optional.txt new file mode 100644 index 000000000..f8967f127 --- /dev/null +++ b/pending_changelog/blinded-hop-features-optional.txt @@ -0,0 +1,5 @@ +## Bug Fixes + +* LDK previously would fail to forward an intermediate blinded payment + if the blinded hop features were absent, potentially breaking + interoperability.