When the wallet is rescanned at startup in `bitcoind`, there seems to be no way to interrupt that in a clean way (other than forcefully killing the process).
{
    LOCK(cs_wallet); 
    if (nWalletVersion >= nVersion)
        return true;
    
    if (fExplicit && nVersion > nWalletMaxVersion)
            nVersion = FEATURE_LATEST;
    nWalletVersion = nVersion;
    if (nVersion > nWalletMaxVersion)
        nWalletMaxVersion = nVersion;
    {
        WalletBatch* batch = batch_in ? batch_in : new WalletBatch(*database);
        if (nWalletVersion > 40000)
            batch->WriteMinVersion(nWalletVersion);
        if (!batch_in)
            delete batch;
    }
    return true;
}
bool CWallet::SetMaxVersion(int nVersion)
{
    LOCK(cs_wallet); 
    
    if (nWalletVersion > nVersion)
        return false;
    nWalletMaxVersion = nVersion;
    return true;
}
std::set<uint256> CWallet::GetConflicts(const uint256& txid) const