Skip to content

Commit 2aabf78

Browse files
committed
Rename min relay fee to incremental relay fee
1 parent 2c5a1f6 commit 2aabf78

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lightning/src/chain/chaininterface.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub trait FeeEstimator {
176176
}
177177

178178
/// Minimum relay fee as required by bitcoin network mempool policy.
179-
pub const MIN_RELAY_FEE_SAT_PER_1000_WEIGHT: u64 = 4000;
179+
pub const INCREMENTAL_RELAY_FEE_SAT_PER_1000_WEIGHT: u64 = 4000;
180180
/// Minimum feerate that takes a sane approach to bitcoind weight-to-vbytes rounding.
181181
/// See the following Core Lightning commit for an explanation:
182182
/// <https://github.com/ElementsProject/lightning/commit/2e687b9b352c9092b5e8bd4a688916ac50b44af0>

lightning/src/chain/package.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
3131
use crate::ln::channelmanager::MIN_CLTV_EXPIRY_DELTA;
3232
use crate::ln::msgs::DecodeError;
3333
use crate::chain::channelmonitor::COUNTERPARTY_CLAIMABLE_WITHIN_BLOCKS_PINNABLE;
34-
use crate::chain::chaininterface::{FeeEstimator, ConfirmationTarget, MIN_RELAY_FEE_SAT_PER_1000_WEIGHT, compute_feerate_sat_per_1000_weight, FEERATE_FLOOR_SATS_PER_KW};
34+
use crate::chain::chaininterface::{FeeEstimator, ConfirmationTarget, INCREMENTAL_RELAY_FEE_SAT_PER_1000_WEIGHT, compute_feerate_sat_per_1000_weight, FEERATE_FLOOR_SATS_PER_KW};
3535
use crate::chain::transaction::MaybeSignedTransaction;
3636
use crate::sign::ecdsa::EcdsaChannelSigner;
3737
use crate::chain::onchaintx::{FeerateStrategy, ExternalHTLCClaim, OnchainTxHandler};
@@ -1243,7 +1243,7 @@ impl Readable for PackageTemplate {
12431243
/// fee and the corresponding updated feerate. If fee is under [`FEERATE_FLOOR_SATS_PER_KW`], we
12441244
/// return nothing.
12451245
///
1246-
/// [`FEERATE_FLOOR_SATS_PER_KW`]: crate::chain::chaininterface::MIN_RELAY_FEE_SAT_PER_1000_WEIGHT
1246+
/// [`FEERATE_FLOOR_SATS_PER_KW`]: crate::chain::chaininterface::INCREMENTAL_RELAY_FEE_SAT_PER_1000_WEIGHT
12471247
fn compute_fee_from_spent_amounts<F: Deref, L: Logger>(
12481248
input_amounts: u64, predicted_weight: u64, conf_target: ConfirmationTarget, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
12491249
) -> Option<(u64, u64)>
@@ -1317,7 +1317,7 @@ where
13171317
}
13181318

13191319
let previous_fee = previous_feerate * predicted_weight / 1000;
1320-
let min_relay_fee = MIN_RELAY_FEE_SAT_PER_1000_WEIGHT * predicted_weight / 1000;
1320+
let min_relay_fee = INCREMENTAL_RELAY_FEE_SAT_PER_1000_WEIGHT * predicted_weight / 1000;
13211321
// BIP 125 Opt-in Full Replace-by-Fee Signaling
13221322
// * 3. The replacement transaction pays an absolute fee of at least the sum paid by the original transactions.
13231323
// * 4. The replacement transaction must also pay for its own bandwidth at or above the rate set by the node's minimum relay fee setting.

0 commit comments

Comments
 (0)