Correct DecodedOnionFailure when processing we-are-intro-node path
authorValentine Wallace <vwallace@protonmail.com>
Thu, 14 Sep 2023 15:41:35 +0000 (11:41 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 22 Sep 2023 19:56:23 +0000 (15:56 -0400)
We don't support sending to paths where we are the intro node yet, but may as
well set the failure correctly now.

lightning/src/ln/onion_utils.rs

index d6bf117e8146f512821e6b09befdc99336e8ac84..4b5ccfe92dd1ce2d768950eee2c1c6df5fa31b3d 100644 (file)
@@ -474,7 +474,9 @@ pub(super) fn process_onion_failure<T: secp256k1::Signing, L: Deref>(
                                // Got an error from within a blinded route.
                                error_code_ret = Some(BADONION | PERM | 24); // invalid_onion_blinding
                                error_packet_ret = Some(vec![0; 32]);
-                               is_from_final_node = false;
+                               res = Some(FailureLearnings {
+                                       network_update: None, short_channel_id: None, payment_failed_permanently: false
+                               });
                                return
                        },
                };