Struct FixedPenaltyScorer
pub struct FixedPenaltyScorer { /* private fields */ }
Expand description
ScoreLookUp
implementation that uses a fixed penalty.
Implementations§
§impl FixedPenaltyScorer
impl FixedPenaltyScorer
pub fn with_penalty(penalty_msat: u64) -> FixedPenaltyScorer
pub fn with_penalty(penalty_msat: u64) -> FixedPenaltyScorer
Creates a new scorer using penalty_msat
.
Trait Implementations§
§impl Clone for FixedPenaltyScorer
impl Clone for FixedPenaltyScorer
§fn clone(&self) -> FixedPenaltyScorer
fn clone(&self) -> FixedPenaltyScorer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl ReadableArgs<u64> for FixedPenaltyScorer
impl ReadableArgs<u64> for FixedPenaltyScorer
§fn read<R>(
r: &mut R,
penalty_msat: u64,
) -> Result<FixedPenaltyScorer, DecodeError>where
R: Read,
fn read<R>(
r: &mut R,
penalty_msat: u64,
) -> Result<FixedPenaltyScorer, DecodeError>where
R: Read,
Reads a
Self
in from the given Read
.§impl ScoreLookUp for FixedPenaltyScorer
impl ScoreLookUp for FixedPenaltyScorer
§type ScoreParams = ()
type ScoreParams = ()
A configurable type which should contain various passed-in parameters for configuring the scorer,
on a per-routefinding-call basis through to the scorer methods,
which are used to determine the parameters for the suitability of channels for use.
§fn channel_penalty_msat(
&self,
_: u64,
_: &NodeId,
_: &NodeId,
_: ChannelUsage,
_score_params: &<FixedPenaltyScorer as ScoreLookUp>::ScoreParams,
) -> u64
fn channel_penalty_msat( &self, _: u64, _: &NodeId, _: &NodeId, _: ChannelUsage, _score_params: &<FixedPenaltyScorer as ScoreLookUp>::ScoreParams, ) -> 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§impl ScoreUpdate for FixedPenaltyScorer
impl ScoreUpdate for FixedPenaltyScorer
§fn payment_path_failed(&mut self, _path: &Path, _short_channel_id: u64)
fn payment_path_failed(&mut self, _path: &Path, _short_channel_id: u64)
Handles updating channel penalties after failing to route through a channel.
§fn payment_path_successful(&mut self, _path: &Path)
fn payment_path_successful(&mut self, _path: &Path)
Handles updating channel penalties after successfully routing along a path.
§fn probe_failed(&mut self, _path: &Path, _short_channel_id: u64)
fn probe_failed(&mut self, _path: &Path, _short_channel_id: u64)
Handles updating channel penalties after a probe over the given path failed.
§fn probe_successful(&mut self, _path: &Path)
fn probe_successful(&mut self, _path: &Path)
Handles updating channel penalties after a probe over the given path succeeded.
§impl Writeable for FixedPenaltyScorer
impl Writeable for FixedPenaltyScorer
Auto Trait Implementations§
impl Freeze for FixedPenaltyScorer
impl RefUnwindSafe for FixedPenaltyScorer
impl Send for FixedPenaltyScorer
impl Sync for FixedPenaltyScorer
impl Unpin for FixedPenaltyScorer
impl UnwindSafe for FixedPenaltyScorer
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request