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 Readable for FixedPenaltyScorer
impl Readable for FixedPenaltyScorer
sourceimpl Score for FixedPenaltyScorer
impl Score for FixedPenaltyScorer
sourcefn channel_penalty_msat(
&self,
_: u64,
_: u64,
_: u64,
_: &NodeId,
_: &NodeId
) -> u64
fn channel_penalty_msat(
&self,
_: u64,
_: u64,
_: u64,
_: &NodeId,
_: &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 Writeable for FixedPenaltyScorer
impl Writeable for FixedPenaltyScorer
sourcefn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
Writes self out to the given Writer
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 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