Skip to content

Commit db3d58c

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 db3d58c

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

fuzz/src/chanmon_consistency.rs

+1-1
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

+13-4
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,24 @@ 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'd like a transaction to confirm in the future, but don't want to commit most of the fees
43+
/// required to do so yet. The remaining fees will come via a Child-Pays-For-Parent (CPFP) fee
44+
/// bump of the transaction.
45+
///
46+
/// The feerate returned should be the absolute minimum feerate required to enter most node
47+
/// mempools across the network. Note that if you are not able to obtain this feerate estimate,
48+
/// you should likely use the furthest-out estimate allowed by your fee estimator.
49+
MempoolMinimum,
50+
/// We are happy with a transaction confirming slowly, at least within a day or so worth of
51+
/// blocks.
4352
Background,
44-
/// We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
53+
/// We'd like a transaction to confirm without major delayed, i.e., within the next 12-24 blocks.
4554
Normal,
46-
/// We'd like this transaction to confirm in the next few blocks.
55+
/// We'd like a transaction to confirm in the next few blocks.
4756
HighPriority,
4857
}
4958

0 commit comments

Comments
 (0)