]> git.bitcoin.ninja Git - rust-lightning/commit
[router] Fix + test routing via next/last-hop hints only
authorMatt Corallo <git@bluematt.me>
Thu, 12 Nov 2020 23:57:02 +0000 (18:57 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 23 Nov 2020 18:52:51 +0000 (13:52 -0500)
commit50b348c4fa7079dcb008d3d5cf8ebc18e5200874
tree78f79a33d8d8007f70a15129c36d5a362b11d33e
parent23a1d7aab5c2cc6f00636815fa126716456dfcfd
[router] Fix + test routing via next/last-hop hints only

We had code in the router to support sending a payment via a single
hop across channels exclusively provided by the next-/last-hop hints.
However, in updating the fuzzer, I noted that this case not only
didn't work, but paniced in some cases.

Here, we both fix the panic, as well as write a new test which
ensures we don't break support for such routing in the future.
lightning/src/routing/router.rs