Skip to content

Commit b90b294

Browse files
jkczyzclaude
andcommitted
Deduplicate the funding feerate ceiling in splice_in and splice_out
The 1.5x-of-estimate funding feerate ceiling was open-coded identically in splice_in and splice_out. Route both through the max_funding_feerate helper so the ceiling lives in one place. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 55b34c4 commit b90b294

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ impl Node {
15781578
{
15791579
let min_feerate =
15801580
self.fee_estimator.estimate_fee_rate(ConfirmationTarget::ChannelFunding);
1581-
let max_feerate = FeeRate::from_sat_per_kwu(min_feerate.to_sat_per_kwu() * 3 / 2);
1581+
let max_feerate = max_funding_feerate(min_feerate);
15821582

15831583
let splice_amount_sats = match splice_amount_sats {
15841584
FundingAmount::Exact { amount_sats } => amount_sats,
@@ -1767,7 +1767,7 @@ impl Node {
17671767

17681768
let min_feerate =
17691769
self.fee_estimator.estimate_fee_rate(ConfirmationTarget::ChannelFunding);
1770-
let max_feerate = FeeRate::from_sat_per_kwu(min_feerate.to_sat_per_kwu() * 3 / 2);
1770+
let max_feerate = max_funding_feerate(min_feerate);
17711771

17721772
let funding_template = self
17731773
.channel_manager

0 commit comments

Comments
 (0)