Commit graph

3 commits

Author SHA1 Message Date
Oliver Gugger
dccea8feba multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
Boris Nagaev
74f48480e0
tests: fix stale regtest assumptions after #2467
PR #2467 changed regtest to match Core's BIP34/65/66 activation rules, and
the merged stack carries that (commit cd4e5426 "regtest: align activations
with Bitcoin Core"). Height-1 regtest blocks now need a BIP34-compliant
coinbase height and a post-BIP66 block version.

The failing tests came from commits added after PR #2467 was opened on
December 25, 2025 but before it merged on April 30, 2026:

- c1a46122 ("blockchain: add ProcessBlockHeader")
- f9645f07 ("blockchain: reuse existing header node in maybeAcceptBlock")
- dc6e096c ("netsync: add TestSyncStateMachine for end-to-end IBD sync flow")
- ce094262 ("netsync: add TestStartSyncBlockFallback for block-only sync path")
- 2aae8a6d ("netsync: add TestStartSyncChainCurrent for chain-current noop path")

Because those tests landed later, they kept the old regtest assumptions even
though #2467 had already been authored and tested against the older tree.
Once #2467 finally merged, these newer tests started building invalid regtest
blocks and headers.

Fix them by setting the genesis tip height to 0 before generating descendants,
using Version 4 in the regtest block/header helpers, and encoding the test
coinbase height with a minimal BIP34 push plus padding for the generic coinbase
script-length rule.
2026-05-06 17:16:25 -05:00
Calvin Kim
c1a46122ca blockchain: add ProcessBlockHeader
ProcessBlockHeader performs chain selection and context-free &
contextual validation for the given block header.  The function allows
a header-first downloading of blocks even without checkpoints.
2026-02-25 18:49:51 +09:00