]> 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>
Sun, 26 Jun 2022 18:36:41 +0000 (18:36 +0000)
commit1597df4b5220427caa28c49f97b140464026ec79
tree67cca90f5042f15d9d120566099200826c5b6657
parent42812778f81aea6f53a99d397b96bfba29290356
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