LoadChainTip requires cs_main to be locked. Under some conditions, it may call ActivateBestChain. However, ActivateBestChain requires cs_main NOT to be taken when called.
{
    AssertLockHeld(cs_main);
    assert(lp);
    
    
    if (lp->maxInputBlock) {
        
        
        if (!::ChainActive().Contains(lp->maxInputBlock)) {
            return false;
        }
    }
    
    return true;
}
bool CheckSequenceLocks(const CTxMemPool& pool, const CTransaction& tx, int flags, LockPoints* lp, bool useExistingLockPoints)