services/blockvalidation/catchup/header_validation.go:ValidateHeaderProofOfWork calls HasMetTargetDifficulty without a network-target bound. It is used by the live catchup header-validation path. Checking a hash against the target chosen in its own header does not establish that the declared target is permitted on the configured network.
Pass network parameters through the catchup validation entry points and enforce the network PoW limit before accepting header work or progressing to expensive processing. Keep the expected-difficulty schedule check separate: a network floor is necessary but does not replace that rule. Preserve the intended STN and regtest parameter behavior.
Acceptance: a synthetic header whose hash satisfies an easier-than-mainnet target is rejected on mainnet; the configured minimum is accepted where appropriate; malformed nBits still fails; test the live caller wiring as well as the helper. See also #1435 for the distinct accumulated-chainwork requirement.
services/blockvalidation/catchup/header_validation.go:ValidateHeaderProofOfWorkcallsHasMetTargetDifficultywithout a network-target bound. It is used by the live catchup header-validation path. Checking a hash against the target chosen in its own header does not establish that the declared target is permitted on the configured network.Pass network parameters through the catchup validation entry points and enforce the network PoW limit before accepting header work or progressing to expensive processing. Keep the expected-difficulty schedule check separate: a network floor is necessary but does not replace that rule. Preserve the intended STN and regtest parameter behavior.
Acceptance: a synthetic header whose hash satisfies an easier-than-mainnet target is rejected on mainnet; the configured minimum is accepted where appropriate; malformed nBits still fails; test the live caller wiring as well as the helper. See also #1435 for the distinct accumulated-chainwork requirement.