pub struct ProbabilisticScorerUsingTime<G: Deref<Target = NetworkGraph>, T: Time> { /* private fields */ }
Expand description
Probabilistic Score
implementation.
(C-not exported) generally all users should use the ProbabilisticScorer
type alias.
Implementations
sourceimpl<G: Deref<Target = NetworkGraph>, T: Time> ProbabilisticScorerUsingTime<G, T>
impl<G: Deref<Target = NetworkGraph>, T: Time> ProbabilisticScorerUsingTime<G, T>
sourcepub fn new(params: ProbabilisticScoringParameters, network_graph: G) -> Self
pub fn new(params: ProbabilisticScoringParameters, network_graph: G) -> Self
Creates a new scorer using the given scoring parameters for sending payments from a node through a network graph.
Trait Implementations
sourceimpl<G, T> ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T> where
G: Deref<Target = NetworkGraph>,
T: Time,
impl<G, T> ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T> where
G: Deref<Target = NetworkGraph>,
T: Time,
sourcefn read<R: Read>(
r: &mut R,
args: (ProbabilisticScoringParameters, G)
) -> Result<Self, DecodeError>
fn read<R: Read>(
r: &mut R,
args: (ProbabilisticScoringParameters, G)
) -> Result<Self, DecodeError>
Reads a Self in from the given Read
sourceimpl<G: Deref<Target = NetworkGraph>, T: Time> Score for ProbabilisticScorerUsingTime<G, T>
impl<G: Deref<Target = NetworkGraph>, T: Time> Score for ProbabilisticScorerUsingTime<G, T>
sourcefn channel_penalty_msat(
&self,
short_channel_id: u64,
amount_msat: u64,
capacity_msat: u64,
source: &NodeId,
target: &NodeId
) -> u64
fn channel_penalty_msat(
&self,
short_channel_id: u64,
amount_msat: u64,
capacity_msat: u64,
source: &NodeId,
target: &NodeId
) -> u64
Returns the fee in msats willing to be paid to avoid routing send_amt_msat
through the
given channel in the direction from source
to target
. Read more
sourcefn payment_path_failed(&mut self, path: &[&RouteHop], short_channel_id: u64)
fn payment_path_failed(&mut self, path: &[&RouteHop], short_channel_id: u64)
Handles updating channel penalties after failing to route through a channel.
sourcefn payment_path_successful(&mut self, path: &[&RouteHop])
fn payment_path_successful(&mut self, path: &[&RouteHop])
Handles updating channel penalties after successfully routing along a path.
sourceimpl<G: Deref<Target = NetworkGraph>, T: Time> Writeable for ProbabilisticScorerUsingTime<G, T>
impl<G: Deref<Target = NetworkGraph>, T: Time> Writeable for ProbabilisticScorerUsingTime<G, T>
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn encode_with_len(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_with_len(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
Auto Trait Implementations
impl<G, T> RefUnwindSafe for ProbabilisticScorerUsingTime<G, T> where
G: RefUnwindSafe,
T: RefUnwindSafe,
impl<G, T> Send for ProbabilisticScorerUsingTime<G, T> where
G: Send,
T: Send,
impl<G, T> Sync for ProbabilisticScorerUsingTime<G, T> where
G: Sync,
T: Sync,
impl<G, T> Unpin for ProbabilisticScorerUsingTime<G, T> where
G: Unpin,
T: Unpin,
impl<G, T> UnwindSafe for ProbabilisticScorerUsingTime<G, T> where
G: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more