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).
{
    
    if (IsCoinBase() && GetBlocksToMaturity() > 0)
        return 0;
    CAmount credit = 0;
    if (filter & ISMINE_SPENDABLE)
    {
        
        if (fCreditCached)
            credit += nCreditCached;
        else
        {
            nCreditCached = pwallet->GetCredit(*tx, ISMINE_SPENDABLE);