From c9fe69fa5fe2ce50dde6e5b59a16d5783a29a9d7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 2 Dec 2022 21:12:47 +0000 Subject: [PATCH] Correctly handle any `UPDATE` errors to phandom invoices If we try to send any onion error with the `UPDATE` flag in response to a phantom receipt, we should always swap it for something generic that doesn't require a `channel_update` in it. Here we use `temporary_node_failure`. Test provided by Valentine Wallace --- lightning/src/ln/channelmanager.rs | 8 +++++- lightning/src/ln/onion_route_tests.rs | 39 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index e0a54841e..6e5df1590 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -2222,7 +2222,7 @@ impl ChannelManager ChannelManager