X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Fmod.rs;fp=lightning%2Fsrc%2Frouting%2Fmod.rs;h=1cf73c2689eecc9029114d7ab6d24c4b19b66557;hb=e15a18a503a64625693ce20cabee00b20c9f3874;hp=ca7b920563839cab087eaab7b3e102e8eb268cb9;hpb=da498d7974bb1e8de5ccec090a1819e63f882350;p=rust-lightning diff --git a/lightning/src/routing/mod.rs b/lightning/src/routing/mod.rs index ca7b9205..1cf73c26 100644 --- a/lightning/src/routing/mod.rs +++ b/lightning/src/routing/mod.rs @@ -9,5 +9,14 @@ //! Structs and impls for receiving messages about the network and storing the topology live here. -pub mod router; pub mod network_graph; +pub mod router; +pub mod scorer; + +/// 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; +}