X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Frouter.rs;h=e60449e15639561c73c75b239d6abbe3e04b4305;hb=dc39799c60317d024733f4d3042c40448a4d39d7;hp=09cee2a2e84e8b8acb2d63842c2ed054d387e9ee;hpb=5e577cb94afe8838a4456f4c81acb073a35e3463;p=rust-lightning diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 09cee2a2..e60449e1 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 @@ -2138,7 +2139,7 @@ mod tests { use crate::routing::scoring::{ChannelUsage, Score, ProbabilisticScorer, ProbabilisticScoringParameters}; use crate::routing::test_utils::{add_channel, add_or_update_node, build_graph, build_line_graph, id_to_feature_flags, get_nodes, update_channel}; use crate::chain::transaction::OutPoint; - use crate::chain::keysinterface::KeysInterface; + use crate::chain::keysinterface::{EntropySource, KeysInterface}; use crate::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures}; use crate::ln::msgs::{ErrorAction, LightningError, UnsignedChannelUpdate, MAX_VALUE_MSAT}; use crate::ln::channelmanager; @@ -5652,7 +5653,7 @@ mod benches { use bitcoin::hashes::Hash; use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey}; use crate::chain::transaction::OutPoint; - use crate::chain::keysinterface::{KeysManager,KeysInterface}; + use crate::chain::keysinterface::{EntropySource, KeysManager,KeysInterface}; use crate::ln::channelmanager::{self, ChannelCounterparty, ChannelDetails}; use crate::ln::features::InvoiceFeatures; use crate::routing::gossip::NetworkGraph;