X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Fscoring.rs;h=537d75012abc88b9233d403c03aac469b2cf77e4;hb=40a4f861144e28c5e287fbc52fad57b1a24017b4;hp=b02b61fa9f6c0381fe9fd7ffcad4eedd23656be5;hpb=28faf89df3027b7fea21c0717967ffbc721e1262;p=rust-lightning diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index b02b61fa..537d7501 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -189,6 +189,7 @@ impl<'a, S: Writeable> Writeable for MutexGuard<'a, S> { } } +#[derive(Clone)] /// [`Score`] implementation that uses a fixed penalty. pub struct FixedPenaltyScorer { penalty_msat: u64, @@ -246,13 +247,13 @@ type ConfiguredTime = time::Eternity; /// [`Score`] implementation. /// /// (C-not exported) generally all users should use the [`Scorer`] type alias. -#[doc(hidden)] pub struct ScorerUsingTime { params: ScoringParameters, // TODO: Remove entries of closed channels. channel_failures: HashMap>, } +#[derive(Clone)] /// Parameters for configuring [`Scorer`]. pub struct ScoringParameters { /// A fixed penalty in msats to apply to each channel. @@ -493,7 +494,6 @@ pub type ProbabilisticScorer = ProbabilisticScorerUsingTime::, T: Time> { params: ProbabilisticScoringParameters, network_graph: G,