From: Matt Corallo Date: Mon, 2 Jan 2023 01:07:59 +0000 (+0000) Subject: `#[derive(Clone)]` for `InFlightHtlcs` X-Git-Tag: v0.0.114-beta~76^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2023-01-in-flight-clone;p=rust-lightning `#[derive(Clone)]` for `InFlightHtlcs` This is useful for bindings, and generally isn't a bad thing for users to have access to. --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index c1ef01bff..e60449e15 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -181,6 +181,7 @@ impl<'a, S: Score> Score for ScorerAccountingForInFlightHtlcs<'a, S> { /// A data structure for tracking in-flight HTLCs. May be used during pathfinding to account for /// in-use channel liquidity. +#[derive(Clone)] pub struct InFlightHtlcs( // A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC // is traveling in. The direction boolean is determined by checking if the HTLC source's public