X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FMaxDustHTLCExposure.java;h=2bd6f0c100681c73c7cd8a3f06e29f25813472a3;hb=125fdf2b7111945df72dd4ee73f98bedccdd64c4;hp=15837fd3044e27affb9b9e818037772fafdb0011;hpb=3e33cfde4213dafe90eb976eb67224e2451da855;p=ldk-java diff --git a/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java b/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java index 15837fd3..2bd6f0c1 100644 --- a/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java +++ b/src/main/java/org/ldk/structs/MaxDustHTLCExposure.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; /** - * Options for how to set the max dust HTLC exposure allowed on a channel. See + * Options for how to set the max dust exposure allowed on a channel. See * [`ChannelConfig::max_dust_htlc_exposure`] for details. */ @SuppressWarnings("unchecked") // We correctly assign various generic arrays @@ -50,19 +50,17 @@ public class MaxDustHTLCExposure extends CommonBase { } } /** - * This sets a multiplier on the estimated high priority feerate (sats/KW, as obtained from - * [`FeeEstimator`]) to determine the maximum allowed dust exposure. If this variant is used - * then the maximum dust exposure in millisatoshis is calculated as: - * `high_priority_feerate_per_kw * value`. For example, with our default value - * `FeeRateMultiplier(5000)`: + * This sets a multiplier on the [`ConfirmationTarget::OnChainSweep`] feerate (in sats/KW) to + * determine the maximum allowed dust exposure. If this variant is used then the maximum dust + * exposure in millisatoshis is calculated as: + * `feerate_per_kw * value`. For example, with our default value + * `FeeRateMultiplier(10_000)`: * * - For the minimum fee rate of 1 sat/vByte (250 sat/KW, although the minimum * defaults to 253 sats/KW for rounding, see [`FeeEstimator`]), the max dust exposure would - * be 253 * 5000 = 1,265,000 msats. + * be 253 * 10_000 = 2,530,000 msats. * - For a fee rate of 30 sat/vByte (7500 sat/KW), the max dust exposure would be - * 7500 * 5000 = 37,500,000 msats. - * - * This allows the maximum dust exposure to automatically scale with fee rate changes. + * 7500 * 50_000 = 75,000,000 msats (0.00075 BTC). * * Note, if you're using a third-party fee estimator, this may leave you more exposed to a * fee griefing attack, where your fee estimator may purposely overestimate the fee rate, @@ -77,6 +75,7 @@ public class MaxDustHTLCExposure extends CommonBase { * by default this will be set to a [`Self::FixedLimitMsat`] of 5,000,000 msat. * * [`FeeEstimator`]: crate::chain::chaininterface::FeeEstimator + * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep */ public final static class FeeRateMultiplier extends MaxDustHTLCExposure { public final long fee_rate_multiplier; @@ -132,7 +131,7 @@ public class MaxDustHTLCExposure extends CommonBase { * This ignores pointers and is_owned flags and looks at the values in fields. */ public boolean eq(org.ldk.structs.MaxDustHTLCExposure b) { - boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr); + boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr); Reference.reachabilityFence(this); Reference.reachabilityFence(b); return ret;