]> git.bitcoin.ninja Git - rust-lightning/commit
Use `Default::default()` to construct `()` as a test scoring param 2023-09-default-score-params
authorMatt Corallo <git@bluematt.me>
Thu, 21 Sep 2023 01:44:23 +0000 (01:44 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 21 Sep 2023 01:44:23 +0000 (01:44 +0000)
commit6b0d94a3029f74de3a7542cbba0d48c2f7e5866b
tree41f9a292584061129cbcc28c78cdef3334e642bd
parentf2fe95e5657ffa8f2b2f4793f1b693e4c1c0bd9c
Use `Default::default()` to construct `()` as a test scoring param

In bindings, we can't use unbounded generic types, and thus have to
rip out the `ScoreParams` and replace them with static
`ProbabilisticScoringFeeParams` universally. To make this easier,
using `Default::default()` everywhere allows the type to change out
from under the test without the test needing to change.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/shutdown_tests.rs
lightning/src/routing/router.rs