Right now to recover from a backup with an encrypted HD wallet the user must do something like unlock the wallet with a really long time out and manually trigger a rescan,  otherwise they risk missing some keys when auto-topup cannot run.
WalletLogPrintf("Still rescanning. At block %d. Progress=%f\n", block_height, progress_current);
        }
        bool fetch_block{true};
        if (fast_rescan_filter) {
            fast_rescan_filter->UpdateNeeded();
            auto matches_block{fast_rescan_filter->MatchesBlock(block_hash)};
            if (matches_block.has_value()) {
                if (*matches_block) {
                    LogPrint(BCLogSCAN, "Fast rescan inspect block %d [%s] (filter matched)\n", block_height, block_hash.ToString());
                } else {
                    result.last_scanned_block = block_hash;
                    result.last_scanned_height = block_height;
                    fetch_block = false;
                }
            } else {
                LogPrint(BCLogSCAN, "Fast rescan inspect block %d [%s] (WARNING block filter not found!)\n", block_height, block_hash.ToString());
            }
        }
        // Find 
        // is sl
        bool block_still_active = false;
        bool next_block = false;
        uint256 next_block_hash;
        chain().findBlock(block_hash, FoundBlock().inActiveChain(block_still_active).nextBlock(FoundBlock().inActiveChain(next_block).hash(next_block_hash)));
        if (fetch_block) {
            // Read 
            CBlock block;
            chain().findBlock(block_hash, FoundBlock().data(block));
            if (!block.IsNull()) {
                LOCK(cs_);