Commit 9cde27d
committed
test(blocks): bind latest_ts to binary-search output via interior window
The wiring tests added in this PR's first commit prove the memo is
consulted and the head closure is wired correctly, but the chosen
windows both rely on the bound-overlap short-circuits in
`compute_block_range_given_bounds`. Under those windows, a regression
that swaps `genesis_ts` and `latest_ts` at the compute call site — or
otherwise threads the wrong `latest_ts` into the binary search — still
produces the right answer because both values lie outside the queried
range in the same direction.
Add a third test with a window strictly inside chain history. Both
bounds drive the binary search, and the returned `(2, 2)` depends on
`latest_ts == 1400` being honestly fed to
`compute_block_range_given_bounds`; a regression that supplies
`genesis_ts` (1000) in its place fires the `end_ts >= latest_ts`
short-circuit and yields `(2, latest)`.
Surfaced by `/pr-review` during PR #8.1 parent a36f0d3 commit 9cde27d
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1689 | 1689 | | |
1690 | 1690 | | |
1691 | 1691 | | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
1692 | 1730 | | |
1693 | 1731 | | |
0 commit comments