X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Fmod.rs;h=51ffd91b50483d58bc2016440bdb98d9f82886e5;hb=46b68c517dba57bde545ea8e56b47fe3af768579;hp=1cf73c2689eecc9029114d7ab6d24c4b19b66557;hpb=2398f1746d592b7c71100a61094d7bfc9bc8f1cd;p=rust-lightning diff --git a/lightning/src/routing/mod.rs b/lightning/src/routing/mod.rs index 1cf73c26..51ffd91b 100644 --- a/lightning/src/routing/mod.rs +++ b/lightning/src/routing/mod.rs @@ -13,10 +13,13 @@ pub mod network_graph; pub mod router; pub mod scorer; +use routing::network_graph::NodeId; + /// An interface used to score payment channels for path finding. /// /// Scoring is in terms of fees willing to be paid in order to avoid routing through a channel. pub trait Score { - /// Returns the fee in msats willing to be paid to avoid routing through the given channel. - fn channel_penalty_msat(&self, short_channel_id: u64) -> u64; + /// Returns the fee in msats willing to be paid to avoid routing through the given channel + /// in the direction from `source` to `target`. + fn channel_penalty_msat(&self, short_channel_id: u64, source: &NodeId, target: &NodeId) -> u64; }