pub struct RoutedPayment {
pub incoming: OrderedMap<ChannelId, u64>,
pub outgoing: OrderedMap<ChannelId, u64>,
pub preimage: Option<PaymentPreimage>,
}
Expand description
Keeps track of incoming and outgoing HTLCs for a routed payment
Fields§
§incoming: OrderedMap<ChannelId, u64>
Incoming payments per channel in satoshi
outgoing: OrderedMap<ChannelId, u64>
Outgoing payments per channel in satoshi
preimage: Option<PaymentPreimage>
The preimage for the hash, filled in on success
Implementations§
Source§impl RoutedPayment
impl RoutedPayment
Sourcepub fn new() -> RoutedPayment
pub fn new() -> RoutedPayment
Create an empty routed payment
Sourcepub fn is_fulfilled(&self) -> bool
pub fn is_fulfilled(&self) -> bool
Whether we know the preimage, and therefore the incoming is claimable
Sourcepub fn is_no_incoming(&self) -> bool
pub fn is_no_incoming(&self) -> bool
Whether there is any incoming payment
Sourcepub fn is_no_outgoing(&self) -> bool
pub fn is_no_outgoing(&self) -> bool
Whether there is no outgoing payment
Sourcepub fn updated_incoming_outgoing(
&self,
channel_id: &ChannelId,
incoming_amount_sat: u64,
outgoing_amount_sat: u64,
) -> (u64, u64)
pub fn updated_incoming_outgoing( &self, channel_id: &ChannelId, incoming_amount_sat: u64, outgoing_amount_sat: u64, ) -> (u64, u64)
The total incoming and outgoing, if this channel updates to the specified values
Sourcepub fn incoming_outgoing(&self) -> (u64, u64)
pub fn incoming_outgoing(&self) -> (u64, u64)
The total incoming and outgoing, in satoshi
Trait Implementations§
Source§impl Clone for RoutedPayment
impl Clone for RoutedPayment
Source§fn clone(&self) -> RoutedPayment
fn clone(&self) -> RoutedPayment
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 moreAuto Trait Implementations§
impl Freeze for RoutedPayment
impl RefUnwindSafe for RoutedPayment
impl Send for RoutedPayment
impl Sync for RoutedPayment
impl Unpin for RoutedPayment
impl UnwindSafe for RoutedPayment
Blanket Implementations§
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more