Struct lightning_signer::node::RoutedPayment
source · 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 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