This is a step toward removing the Chain::Lock class and reducing cs_main
locking.
This change doesn't affect behavior.
This is part [3/12] of Core [[https://github.com/bitcoin/bitcoin/pull/17954 | PR17954]] : ade5f87971211bc67753f14a0d49e020142efc7c
Depends on D7865