`#[derive(Clone)]` for `InFlightHtlcs` 2023-01-in-flight-clone
authorMatt Corallo <git@bluematt.me>
Mon, 2 Jan 2023 01:07:59 +0000 (01:07 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 2 Jan 2023 01:09:43 +0000 (01:09 +0000)
This is useful for bindings, and generally isn't a bad thing for
users to have access to.

lightning/src/routing/router.rs

index c1ef01bff663ab2ea490403d2946ab386b7b3baa..e60449e15639561c73c75b239d6abbe3e04b4305 100644 (file)
@@ -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