Struct lightning_signer::channel::ChannelBalance
source · pub struct ChannelBalance {
pub claimable: u64,
pub received_htlc: u64,
pub offered_htlc: u64,
pub sweeping: u64,
pub channel_count: u32,
pub received_htlc_count: u32,
pub offered_htlc_count: u32,
}
Expand description
Balances associated with a channel See: https://gitlab.com/lightning-signer/docs/-/wikis/Proposed-L1-and-Channel-Balance-Reconciliation
Fields§
§claimable: u64
Claimable balance on open channel
received_htlc: u64
Sum of htlcs offered to us
offered_htlc: u64
Sum of htlcs we offered
sweeping: u64
Sweeping to wallet
channel_count: u32
Current number of channels
received_htlc_count: u32
Current number of received htlcs
offered_htlc_count: u32
Current number of offered htlcs
Implementations§
source§impl ChannelBalance
impl ChannelBalance
sourcepub fn new(
claimable: u64,
received_htlc: u64,
offered_htlc: u64,
sweeping: u64,
channel_count: u32,
received_htlc_count: u32,
offered_htlc_count: u32
) -> ChannelBalance
pub fn new( claimable: u64, received_htlc: u64, offered_htlc: u64, sweeping: u64, channel_count: u32, received_htlc_count: u32, offered_htlc_count: u32 ) -> ChannelBalance
Create a ChannelBalance with specific values
sourcepub fn zero() -> ChannelBalance
pub fn zero() -> ChannelBalance
Create a ChannelBalance with zero values
sourcepub fn accumulate(&mut self, other: &ChannelBalance)
pub fn accumulate(&mut self, other: &ChannelBalance)
Sum channel balances
Trait Implementations§
source§impl Debug for ChannelBalance
impl Debug for ChannelBalance
source§impl PartialEq<ChannelBalance> for ChannelBalance
impl PartialEq<ChannelBalance> for ChannelBalance
source§fn eq(&self, other: &ChannelBalance) -> bool
fn eq(&self, other: &ChannelBalance) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.