]> git.bitcoin.ninja Git - rust-lightning/commit
Concretize `WriteableScore` into `MultiThreadedLockableScore`
authorMatt Corallo <git@bluematt.me>
Sun, 26 Jun 2022 01:44:21 +0000 (01:44 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 1 Jul 2022 17:48:08 +0000 (17:48 +0000)
commitac1660ef6753cd1e36760686305b5c0b87dd376f
treee15c6b49becf4ae7ae36272da1d16efacbc757b3
parentcf46a52e0eb4bf3339650e25c1c5f39b8f82ff20
Concretize `WriteableScore` into `MultiThreadedLockableScore`

In general the bindings don't handle blanket implementations well -
they generate concrete implementations for everything and don't
bother building up enough context to be aware of the blanket
implementation to avoid duplicating it while still allowing users
to access struct(s) as all implemented traits.

Thus, implementing `WriteableScore` for all `LockableScore`s that
also implement `Writeable` is particularly impractical to map in
bindings.

Further, because `Score` already requires `Writeable`, having a
separate `WriteableScore` doesn't really make any sense.

Here we simply remove `WriteableScore` (in `c_bindings` mode)
entirely and push users through `MultiThreadedLockableScore` in the
higher-level traits that require `Score`.
lightning-background-processor/src/lib.rs
lightning/src/routing/scoring.rs
lightning/src/util/persist.rs