From 6daf62fea3399061b2bd55da7e7e129186e4bd09 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 1 Dec 2022 23:39:28 +0000 Subject: [PATCH] Use `temporary_node_failure` for a phantom HTLC with bogus CLTV When we receive a phantom HTLC with a bogus/modified CLTV, we should fail back with `incorrect_cltv_expiry`, but that requires a `channel_update`, which we cannot generate for a phantom HTLC which has no corresponding channel. Thus, instead, we have to fall back to `incorrect_cltv_expiry`. Fixes #1879 --- lightning/src/ln/channelmanager.rs | 7 +++-- lightning/src/ln/onion_route_tests.rs | 41 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 9ec1c43c..d6f9d94f 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -2278,10 +2278,13 @@ impl ChannelManager