Skip to content

Commit 2d0a0d0

Browse files
committed
Add new ConfirmationTarget variant for min mempool feerates
Now that we support channels with anchor outputs, we add a new ConfirmationTarget variant that, for now, will only apply to such channels. This new variant should target estimating the minimum feerate required to be accepted into most node mempools across the network.
1 parent 07606c1 commit 2d0a0d0

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl FeeEstimator for FuzzEstimator {
7878
// Background feerate which is <= the minimum Normal feerate.
7979
match conf_target {
8080
ConfirmationTarget::HighPriority => MAX_FEE,
81-
ConfirmationTarget::Background => 253,
81+
ConfirmationTarget::Background|ConfirmationTarget::MempoolMinimum => 253,
8282
ConfirmationTarget::Normal => cmp::min(self.ret_val.load(atomic::Ordering::Acquire), MAX_FEE),
8383
}
8484
}

lightning/src/chain/chaininterface.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,19 @@ pub trait BroadcasterInterface {
3535
fn broadcast_transactions(&self, txs: &[&Transaction]);
3636
}
3737

38-
/// An enum that represents the speed at which we want a transaction to confirm used for feerate
38+
/// An enum that represents the priority at which we want a transaction to confirm used for feerate
3939
/// estimation.
4040
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
4141
pub enum ConfirmationTarget {
42-
/// We are happy with this transaction confirming slowly when feerate drops some.
42+
/// We are happy with a transaction eventually confirming, regardless of how long it may take,
43+
/// using the absolute minimum feerate required to enter most node mempools across the network.
44+
MempoolMinimum,
45+
/// We are happy with a transaction confirming slowly, at least within a day or so worth of
46+
/// blocks.
4347
Background,
44-
/// We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
48+
/// We'd like a transaction to confirm without major delayed, i.e., within the next 12-24 blocks.
4549
Normal,
46-
/// We'd like this transaction to confirm in the next few blocks.
50+
/// We'd like a transaction to confirm in the next few blocks.
4751
HighPriority,
4852
}
4953

0 commit comments

Comments
 (0)