Skip to content

Commit 18ebbf7

Browse files
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.
1 parent 2c9dbb9 commit 18ebbf7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lightning/src/blinded_path/payment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl Readable for BlindedPaymentTlvs {
169169
short_channel_id,
170170
payment_relay: payment_relay.ok_or(DecodeError::InvalidValue)?,
171171
payment_constraints: payment_constraints.0.unwrap(),
172-
features: features.ok_or(DecodeError::InvalidValue)?,
172+
features: features.unwrap_or_else(BlindedHopFeatures::empty),
173173
}))
174174
} else {
175175
if payment_relay.is_some() || features.is_some() { return Err(DecodeError::InvalidValue) }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Bug Fixes
2+
3+
* LDK previously would fail to forward an intermediate blinded payment
4+
if the blinded hop features were absent, potentially breaking
5+
interoperability.

0 commit comments

Comments
 (0)