Struct breez_sdk_core::lightning::util::test_utils::TestScorer
pub struct TestScorer { /* private fields */ }
Implementations§
§impl TestScorer
impl TestScorer
pub fn new() -> TestScorer
pub fn expect_usage(&self, scid: u64, expectation: ChannelUsage)
Trait Implementations§
§impl ScoreLookUp for TestScorer
impl ScoreLookUp for TestScorer
§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,
short_channel_id: u64,
_source: &NodeId,
_target: &NodeId,
usage: ChannelUsage,
_score_params: &<TestScorer as ScoreLookUp>::ScoreParams,
) -> u64
fn channel_penalty_msat( &self, short_channel_id: u64, _source: &NodeId, _target: &NodeId, usage: ChannelUsage, _score_params: &<TestScorer 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 TestScorer
impl ScoreUpdate for TestScorer
§fn payment_path_failed(
&mut self,
_actual_path: &Path,
_actual_short_channel_id: u64,
)
fn payment_path_failed( &mut self, _actual_path: &Path, _actual_short_channel_id: u64, )
Handles updating channel penalties after failing to route through a channel.
§fn payment_path_successful(&mut self, _actual_path: &Path)
fn payment_path_successful(&mut self, _actual_path: &Path)
Handles updating channel penalties after successfully routing along a path.
§fn probe_failed(&mut self, _actual_path: &Path, _: u64)
fn probe_failed(&mut self, _actual_path: &Path, _: u64)
Handles updating channel penalties after a probe over the given path failed.
§fn probe_successful(&mut self, _actual_path: &Path)
fn probe_successful(&mut self, _actual_path: &Path)
Handles updating channel penalties after a probe over the given path succeeded.
Auto Trait Implementations§
impl !Freeze for TestScorer
impl !RefUnwindSafe for TestScorer
impl Send for TestScorer
impl !Sync for TestScorer
impl Unpin for TestScorer
impl UnwindSafe for TestScorer
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
§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> 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