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<'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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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> 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