]> git.bitcoin.ninja Git - rust-lightning/commit
Simplify score bounding with a unified type
authorMatt Corallo <git@bluematt.me>
Sun, 24 Sep 2023 23:59:13 +0000 (23:59 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 1 Oct 2023 00:05:01 +0000 (00:05 +0000)
commit0bc0de46fa2f6291891484d3d454d542ed57e318
tree08876ec8b51b1e2cfcf9bd00dd6c795835da441d
parent748bebadb43570fbe7e447492b5ed9544529adab
Simplify score bounding with a unified type

In a few places we require a unified scorer, which implements both
`ScoreLookUp` and `ScoreUpdate`. Rather than double-bounding (which
the bindings generator can't handle directly), we use a top-level
`Score` trait which requires both and is implemented for all
implementers of both supertraits.
lightning/src/routing/router.rs
lightning/src/routing/scoring.rs