This is needed for the next commit.
Note that m_chainman was made const by us in D12227 when backporting "validation: add chainman ref to CChainState" (core#21526), because we could. In this commit is need to be made non-const so m_chainman.AcceptBlockHeader can be called. This member function cannot be made const.
This is a backport of core#23785
https://github.com/bitcoin/bitcoin/pull/23785/commits/fa47b5c100f81c65c15b5a6afaf6c91bc0861264
Depends on D12484