pub struct FixedPenaltyScorer { /* private fields */ }
Expand description
Score
implementation that uses a fixed penalty.
Implementations
sourceimpl FixedPenaltyScorer
impl FixedPenaltyScorer
sourcepub fn with_penalty(penalty_msat: u64) -> Self
pub fn with_penalty(penalty_msat: u64) -> Self
Creates a new scorer using penalty_msat
.
Trait Implementations
sourceimpl Clone for FixedPenaltyScorer
impl Clone for FixedPenaltyScorer
sourcefn clone(&self) -> FixedPenaltyScorer
fn clone(&self) -> FixedPenaltyScorer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ReadableArgs<u64> for FixedPenaltyScorer
impl ReadableArgs<u64> for FixedPenaltyScorer
sourceimpl Score for FixedPenaltyScorer
impl Score for FixedPenaltyScorer
sourcefn channel_penalty_msat(
&self,
_: u64,
_: &NodeId,
_: &NodeId,
_: ChannelUsage
) -> u64
fn channel_penalty_msat(
&self,
_: u64,
_: &NodeId,
_: &NodeId,
_: ChannelUsage
) -> 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.
sourcefn probe_failed(&mut self, _path: &[&RouteHop], _short_channel_id: u64)
fn probe_failed(&mut self, _path: &[&RouteHop], _short_channel_id: u64)
Handles updating channel penalties after a probe over the given path failed.
sourcefn probe_successful(&mut self, _path: &[&RouteHop])
fn probe_successful(&mut self, _path: &[&RouteHop])
Handles updating channel penalties after a probe over the given path succeeded.
sourceimpl Writeable for FixedPenaltyScorer
impl Writeable for FixedPenaltyScorer
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 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 RefUnwindSafe for FixedPenaltyScorer
impl Send for FixedPenaltyScorer
impl Sync for FixedPenaltyScorer
impl Unpin for FixedPenaltyScorer
impl UnwindSafe for FixedPenaltyScorer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more