/// of [`KeysManager`] and [`DefaultRouter`].
///
/// This is not exported to bindings users as Arcs don't make sense in bindings
-pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L> = ChannelManager<&'a M, &'b T, &'c KeysManager, &'c KeysManager, &'c KeysManager, &'d F, &'e DefaultRouter<&'f NetworkGraph<&'g L>, &'g L, &'h Mutex<ProbabilisticScorer<&'f NetworkGraph<&'g L>, &'g L>>>, &'g L>;
+pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L> = ChannelManager<&'a M, &'b T, &'c KeysManager, &'c KeysManager, &'c KeysManager, &'d F, &'e DefaultRouter<&'f NetworkGraph<&'g L>, &'g L, &'h Mutex<ProbabilisticScorer<&'f NetworkGraph<&'g L>, &'g L>>, ProbabilisticScoringFeeParameters, ProbabilisticScorer<&'f NetworkGraph<&'g L>, &'g L>>, &'g L>;
+ macro_rules! define_test_pub_trait { ($vis: vis) => {
/// A trivial trait which describes any [`ChannelManager`] used in testing.
- #[cfg(any(test, feature = "_test_utils"))]
- pub trait AChannelManager {
- type Watch: chain::Watch<Self::Signer>;
+ $vis trait AChannelManager {
+ type Watch: chain::Watch<Self::Signer> + ?Sized;
type M: Deref<Target = Self::Watch>;
- type Broadcaster: BroadcasterInterface;
+ type Broadcaster: BroadcasterInterface + ?Sized;
type T: Deref<Target = Self::Broadcaster>;
- type EntropySource: EntropySource;
+ type EntropySource: EntropySource + ?Sized;
type ES: Deref<Target = Self::EntropySource>;
- type NodeSigner: NodeSigner;
+ type NodeSigner: NodeSigner + ?Sized;
type NS: Deref<Target = Self::NodeSigner>;
- type Signer: WriteableEcdsaChannelSigner;
- type SignerProvider: SignerProvider<Signer = Self::Signer>;
+ type Signer: WriteableEcdsaChannelSigner + Sized;
+ type SignerProvider: SignerProvider<Signer = Self::Signer> + ?Sized;
type SP: Deref<Target = Self::SignerProvider>;
- type FeeEstimator: FeeEstimator;
+ type FeeEstimator: FeeEstimator + ?Sized;
type F: Deref<Target = Self::FeeEstimator>;
- type Router: Router;
+ type Router: Router + ?Sized;
type R: Deref<Target = Self::Router>;
- type Logger: Logger;
+ type Logger: Logger + ?Sized;
type L: Deref<Target = Self::Logger>;
fn get_cm(&self) -> &ChannelManager<Self::M, Self::T, Self::ES, Self::NS, Self::SP, Self::F, Self::R, Self::L>;
}