Also adds a static assertion that MAX_BLOCKTXN_DEPTH <= MIN_BLOCKS_TO_KEEP
from the PR description:
Inspired by core#26308
(backported in D13052 -- D13057)
This is a partial backport of core#26326
https://github.com/bitcoin/bitcoin/pull/26326/commits/613a45cd4b5482aedbdc7c61c839ea05996935c6