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).
}
    return walletInstance;
}
std::atomic<bool> CWallet::fFlushScheduled(false);
void CWallet::postInitProcess(CScheduler& scheduler)
{
    
    
    ReacceptWalletTransactions();
    
    if (!CWallet::fFlushScheduled.exchange(true)) {
        scheduler.scheduleEvery(MaybeCompactWalletDB, 500);
    }
}
bool CWallet::BackupWallet(const std::string& strDest)
{
    return database->Backup(strDest);
}
CKeyPool::CKeyPool()
{
    nTime = GetTime();
    fInternal = false;
}
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)
{
    nTime = GetTime();
    vchPubKey = vchPubKeyIn;
    fInternal = internalIn;
}
CWalletKey::CWalletKey(int64_t nExpires)