Commit 287f17c
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 c20ac77 commit 287f17c
3 files changed
Lines changed: 703 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
372 | 375 | | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| 380 | + | |
| 381 | + | |
377 | 382 | | |
378 | 383 | | |
379 | 384 | | |
| |||
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
391 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
392 | 400 | | |
393 | 401 | | |
394 | 402 | | |
395 | 403 | | |
396 | 404 | | |
| 405 | + | |
| 406 | + | |
397 | 407 | | |
398 | 408 | | |
399 | 409 | | |
| |||
0 commit comments