Skip to content

Commit 0bb047f

Browse files
committed
Keep funding confirmed through test reorgs
The test gave funding six confirmations while allowing six-block reorgs. That drops regular channel funding to zero confirmations and changes the scenario from a close reorg into a funding force-close. rust-lightning PR #4231 keeps trusted zero-conf channels open after funding is reorged out, but regular channels still force-close at zero confirmations. Mine one extra block so the deepest reorg leaves one confirmation. Preserve the CI counterexample that exposed this boundary. Co-Authored-By: HAL 9000
1 parent 150f370 commit 0bb047f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cc 06354c9b049db51c31557bf46d86a68bdd4049577cbd9190fb81c7824b18f0e6 # shrinks to reorg_depth = 6, force_close = false

tests/reorg_test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ proptest! {
7676
nodes_funding_tx.insert(node.node_id(), funding_txo);
7777
}
7878

79-
generate_blocks_and_wait(bitcoind, electrs, 6).await;
79+
// Keep funding confirmed across the deepest reorg. rust-lightning PR #4231 exempts
80+
// only trusted zero-conf channels; regular channels still force-close at zero confirmations.
81+
generate_blocks_and_wait(bitcoind, electrs, 7).await;
8082
sync_wallets!();
8183

8284
reorg!(reorg_depth);

0 commit comments

Comments
 (0)