]> git.bitcoin.ninja Git - rust-lightning/commit
Store an owned `Score` in `ScorerAccountingForInFlightHtlcs`
authorMatt Corallo <git@bluematt.me>
Thu, 22 Dec 2022 21:58:53 +0000 (21:58 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 3 Jan 2023 22:09:15 +0000 (22:09 +0000)
commit916822a1e4d3d04de55b8f0af31726f8fcd7e28f
tree1c6564ecd13b36021f0714c799f556849640c434
parentf6a93826e27c0e417571aafb5ae83f5a1424d0a4
Store an owned `Score` in `ScorerAccountingForInFlightHtlcs`

`ScorerAccountingForInFlightHtlcs` generally stores a `Score`
reference generated by calling `LockableScore::lock`, which
actually returns an arbitrary `Score`. Given `Score` is implemented
directly on lock types, it makes sense to simply hold a fully owned
`Score` in `ScorerAccountingForInFlightHtlcs` rather than a mutable
reference to one.
lightning-invoice/src/payment.rs
lightning/src/routing/router.rs