pub struct AnchorChannelReserveContext {
pub upper_bound_fee_rate: FeeRate,
pub expected_accepted_htlcs: u16,
pub taproot_wallet: bool,
}Expand description
Parameters defining the context around the anchor channel reserve requirement calculation.
Fields§
§upper_bound_fee_rate: FeeRateAn upper bound fee rate estimate used to calculate the anchor channel reserve that is sufficient to provide fees for all required transactions.
expected_accepted_htlcs: u16The expected number of accepted in-flight HTLCs per channel.
Note that malicious counterparties can saturate the number of accepted in-flight HTLCs up to the maximum prior to forcing a unilateral closure. This estimate can include that case as a weighted average, assuming some percentage of channels are controlled by malicious peers and have the maximum number of accepted in-flight HTLCs.
See ChannelHandshakeConfig::our_max_accepted_htlcs to configure the maximum number of accepted in-flight HTLCs.
taproot_wallet: boolWhether the wallet handling anchor channel reserves creates Taproot P2TR outputs for any new outputs, or Segwit P2WPKH outputs otherwise.
Trait Implementations§
Source§impl Clone for AnchorChannelReserveContext
impl Clone for AnchorChannelReserveContext
Source§fn clone(&self) -> AnchorChannelReserveContext
fn clone(&self) -> AnchorChannelReserveContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnchorChannelReserveContext
impl Debug for AnchorChannelReserveContext
Source§impl Default for AnchorChannelReserveContext
A default for the AnchorChannelReserveContext parameters is provided as follows:
impl Default for AnchorChannelReserveContext
A default for the AnchorChannelReserveContext parameters is provided as follows:
- The upper bound fee rate is set to the 99th percentile of the median block fee rate since 2019: ~50 sats/vbyte.
- The number of accepted in-flight HTLCs per channel is set to 10, providing additional margin above the number seen for a large routing node over a month (average <1, maximum 10 accepted in-flight HTLCS aggregated across all channels).
- The wallet is assumed to be a Segwit wallet.