Skip to content

Commit 74f4da3

Browse files
committed
Add ConfirmationTarget::OutputSpendingFee
1 parent cd4cc20 commit 74f4da3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl FeeEstimator for FuzzEstimator {
8484
// Background feerate which is <= the minimum Normal feerate.
8585
match conf_target {
8686
ConfirmationTarget::OnChainSweep => MAX_FEE,
87-
ConfirmationTarget::ChannelCloseMinimum|ConfirmationTarget::AnchorChannelFee|ConfirmationTarget::MinAllowedAnchorChannelRemoteFee|ConfirmationTarget::MinAllowedNonAnchorChannelRemoteFee => 253,
87+
ConfirmationTarget::ChannelCloseMinimum|ConfirmationTarget::AnchorChannelFee|ConfirmationTarget::MinAllowedAnchorChannelRemoteFee|ConfirmationTarget::MinAllowedNonAnchorChannelRemoteFee|ConfirmationTarget::OutputSpendingFee => 253,
8888
ConfirmationTarget::NonAnchorChannelFee => cmp::min(self.ret_val.load(atomic::Ordering::Acquire), MAX_FEE),
8989
}
9090
}

lightning/src/chain/chaininterface.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,17 @@ pub enum ConfirmationTarget {
124124
///
125125
/// [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script
126126
ChannelCloseMinimum,
127+
/// The feerate [`OutputSweeper`] will use on transactions spending
128+
/// [`SpendableOutputDescriptor`]s after a channel closure.
129+
///
130+
/// Generally spending these outputs is safe as long as they eventually confirm, so a value
131+
/// (slightly above) the mempool minimum should suffice. However, as this value will influence
132+
/// how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors
133+
/// might want to choose a higher feerate to regain control over funds faster.
134+
///
135+
/// [`OutputSweeper`]: crate::util::sweep::OutputSweeper
136+
/// [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
137+
OutputSpendingFee,
127138
}
128139

129140
/// A trait which should be implemented to provide feerate information on a number of time

0 commit comments

Comments
 (0)