Skip to content

Commit 008b937

Browse files
committed
Pin BDK 3.1 splice fee accounting
Update splice integration expectations for BDK 3.1's fee rounding fix. This keeps the remaining LDK/BDK fee-accounting drift explicit. It prevents future dependency changes from restoring the larger surplus. Refs #901 Co-Authored-By: HAL 9000
1 parent 5668ca9 commit 008b937

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

tests/integration_tests_rust.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,15 +1150,13 @@ async fn splice_channel() {
11501150
expect_channel_ready_event!(node_b, node_a.node_id());
11511151

11521152
let expected_splice_in_fee_sat = 251;
1153-
let expected_splice_in_onchain_cost_sat = 254;
1153+
let expected_splice_in_onchain_cost_sat = 253;
11541154

1155-
// LDK's fee calculation differs from BDK wallet's, which over pays on fees. Rather than giving
1156-
// the extra fees to the miner, LDK sends it to the channel balance since there may not be a
1157-
// change output.
1158-
//
1159-
// TODO: Some of the discrepancy is addressed upstream, so this number should be adjusted when
1160-
// updating the BDK wallet dependency. See: https://github.com/bitcoindevkit/bdk_wallet/pull/479
1161-
let expected_splice_in_lightning_balance_sat = 4_000_003;
1155+
// BDK 3.1.0 avoids the previous per-UTXO fee rounding during coin selection. Keep the
1156+
// remaining 2-sat LDK/BDK fee-accounting drift explicit so a dependency change cannot silently
1157+
// reintroduce the larger surplus. Rather than giving the extra sats to the miner, LDK sends
1158+
// them to the channel balance since there may not be a change output.
1159+
let expected_splice_in_lightning_balance_sat = 4_000_002;
11621160

11631161
let payments = node_b.list_payments();
11641162
let payment =

0 commit comments

Comments
 (0)