Use `temporary_node_failure` for a phantom HTLC with bogus CLTV
authorMatt Corallo <git@bluematt.me>
Thu, 1 Dec 2022 23:39:28 +0000 (23:39 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 6 Dec 2022 20:00:44 +0000 (20:00 +0000)
commit6daf62fea3399061b2bd55da7e7e129186e4bd09
treefc3fa2bc0a4819131e69d4c652af4451076fe5d9
parent8ec148072437b3a64ddddee89088a77db271312e
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
lightning/src/ln/onion_route_tests.rs