https://cirrus-ci.com/task/5603470202896384?logs=ci#L2681
return time_max + TIMESTAMP_WINDOW + 1;
        }
    }
    return startTime;
}
/**
 * Scan the block chain (starting in start_block) for transactions
 * from or to us.  fUpdate is true, found transactions that already
 * exist in th will be updated.  max_height is not set, the
 * mempool will be scanned as well.
 *
 * @param[in] start_block Scan starting block.  block is not on the active
 *                        chain, the scan will return SUCCESS immediately.
 * @param[in] start_height Height of start_block
 * @param[in] max_height  Optional max scanning height.  unset there is
 *                        no maximum and scanning can continue to the tip
 *
 * @return ScanResult returning scan information and indicating success or
 *         failure. Return status will be set to SUCCESS if scan was
 *         successful. FAILURE if a complete rescan was not possible (due to
 *         pruning or corruption). USER_ABORT if the rescan was aborted before
 *         it could complete.
 *
 * @pre Caller needs to make sure start_block (and the optional stop_block) are on
 * the main chain after to the addition of any new keys you want to detect
 * transactions for.
 */
CWalletScanResult CWalletScanForWalletTransactions(const uint256& start_block, int start_height, stdoptional<int> max_height, const WalletRescanReserver& reserver, bool fUpdate, const bool save_progress)
{
    constexpr auto INTERVAL_TIME{60s};