Skip to content

Commit c33e0dc

Browse files
evanlinjinclaude
andcommitted
fix!: Correct absolute timelock boundary checks
Fix off-by-one error in absolute timelock checks. Bitcoin Core's `IsFinalTx` uses strict less-than: tx is final when `nLockTime < MTP` (for time) or `nLockTime < blockHeight` (for height). The previous checks used `>` but should use `>=` to match Core's behavior. Also add 4 new time-based timelock tests that verify BDK's predictions match Bitcoin Core's actual broadcast acceptance at exact boundaries: - test_absolute_time_timelock_logic (integration) - test_relative_time_timelock_logic (integration) - test_is_time_timelocked_absolute_unit - test_is_time_timelocked_relative_unit Patch miniscript to fix Plan::satisfy() not appending witnessScript for P2WSH descriptors (rust-bitcoin/rust-miniscript#XXX). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 71468bc commit c33e0dc

2 files changed

Lines changed: 690 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ bdk_testenv = { git = "https://github.com/evanlinjin/bdk", branch = "feature/bit
4747
bdk_chain = { git = "https://github.com/evanlinjin/bdk", branch = "feature/bitcoind_rpc_emit_header" }
4848
bdk_core = { git = "https://github.com/evanlinjin/bdk", branch = "feature/bitcoind_rpc_emit_header" }
4949
bdk_bitcoind_rpc = { git = "https://github.com/evanlinjin/bdk", branch = "feature/bitcoind_rpc_emit_header" }
50+
miniscript = { git = "https://github.com/evanlinjin/rust-miniscript", branch = "fix/plan-satisfy-does-not-append-witness-script-for-p2wsh" }
5051

5152
# bdk_chain = { git = "https://github.com/bitcoindevkit/bdk", branch = "master" }
5253
# bdk_core = { git = "https://github.com/bitcoindevkit/bdk", branch = "master" }

0 commit comments

Comments
 (0)