The new `getrpcinfo` shows a list of the active commands and the duration each command has been running. This sounds like a good place to report a completion percentage for any command doing a blockchain rescan, to solve [this problem](https://bitcoin.stackexchange.com/q/83236/90721).
SetMinVersion(FEATURE_WALLETCRYPT, encrypted_batch, true);
        if (!encrypted_batch->TxnCommit()) {
            delete encrypted_batch;
            encrypted_batch = nullptr;
            
            
            assert(false);
        }
        delete encrypted_batch;
        encrypted_batch = nullptr;
        Lock();
        Unlock(strWalletPassphrase);
        
        if (IsHDEnabled()) {
            SetHDSeed(GenerateNewSeed());
        }
        NewKeyPool();
        Lock();
        
        
        database->Rewrite();
        
        
        
        database->ReloadDbEnv();
    }
    NotifyStatusChanged(this);
    return true;
}
DBErrors CWallet::ReorderTransactions()