RewindBlockIndex reads chainActive (via ChainActive()) without holding cs_main:
(Please note that callers of RewindBlockIndex are not allowed to hold cs_main since RewindBlockIndex indirectly calls LimitValidationInterfaceQueue.)
RewindBlockIndex reads chainActive (via ChainActive()) without holding cs_main:
(Please note that callers of RewindBlockIndex are not allowed to hold cs_main since RewindBlockIndex indirectly calls LimitValidationInterfaceQueue.)
I think g_chainstate.RewindBlockIndex(params) could return false if ::ChainActive().Tip() == nullptr, then L4319 could be removed.
So ChainActive() should require cs_main? There's a ton of places where ::ChainActive() is called without the lock..
Milestone
0.19.0