]> 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>
Sun, 25 Dec 2022 00:58:19 +0000 (00:58 +0000)
commit9449d042b985553e6b06761d4a64df16f8bd12ad
tree0b0a575f68a5d5ad9febd136d4a09de9088772ec
parentf0c181e2f26ddd0853884ea652933dc3bcc22181
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