]> git.bitcoin.ninja Git - rust-lightning/commit
Expose a trait impl'd for all `PeerManager` for use as a bound 2023-04-less-pm-bounds
authorMatt Corallo <git@bluematt.me>
Sat, 29 Apr 2023 18:45:59 +0000 (18:45 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 2 May 2023 22:17:25 +0000 (22:17 +0000)
commit14c6810e48ea9a36fc8efc9f2ed788691acb9a02
tree8aed00dbeac9ea79205dce7d5dd7af98d9bb1ca9
parent524981ddf4bae0da695bb40c650812dceeb4d408
Expose a trait impl'd for all `PeerManager` for use as a bound

A while back, in tests, we added a `AChannelManager` trait, which
is implemented for all `ChannelManager`s, and can be used as a
bound when we need a `ChannelManager`, rather than having to
duplicate all the bounds of `ChannelManager` everywhere.

Here we do the same thing for `PeerManager`, but make it public and
use it to clean up `lightning-net-tokio` and
`lightning-background-processor`.

We should likely do the same for `AChannelManager`, but that's left
as a followup.
lightning-background-processor/src/lib.rs
lightning-net-tokio/src/lib.rs
lightning/src/ln/peer_handler.rs