]> git.bitcoin.ninja Git - rust-lightning/commit
Test the `RouteParameters` passed to `TestRouter`
authorMatt Corallo <git@bluematt.me>
Fri, 27 Jan 2023 20:31:10 +0000 (20:31 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 1 Feb 2023 21:16:18 +0000 (21:16 +0000)
commit5ce4bfc1f6369cde16a88f2d2af416fc32f71082
tree6c4ede108617cfba23ddf1290c24a20d6e804e91
parent2b135578e8e88d3e8a16463be7a8ef4458abd33e
Test the `RouteParameters` passed to `TestRouter`

`TestRouter` allows us to simply select the `Route` that will be
returned in the next `find_route` call, but it does so without any
checking of what was *requested* for the call. This makes it a
somewhat dubious test utility as it very helpfully ensures we
ignore errors in the routes we're looking for.

Instead, we require users of `TestRouter` pass a `RouteParameters`
to `expect_find_route`, which we compare against the requested
parameters passed to `find_route`.
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs
lightning/src/util/test_utils.rs