BatchDownloadWork::BatchDownloadWork(Application& app, CheckpointRange range, std::string const& type, TmpDir const& downloadDir) : BatchWork(app, fmt::format("batch-download-{:s}-{:08x}-{:08x}", type, range.first(), range.last())) , mRange(range) , mNext(range.first()) , mFileType(type) , mDownloadDir(downloadDir) { }
bool CatchupWork::downloadTransactions(CheckpointRange const& range) { if (mDownloadTransactionsWork) { assert(mDownloadTransactionsWork->getState() == WORK_SUCCESS); return false; } CLOG(INFO, "History") << "Catchup downloading transactions for range [" << range.first() << ".." << range.last() << "]"; mDownloadTransactionsWork = addWork<BatchDownloadWork>( range, HISTORY_FILE_TYPE_TRANSACTIONS, *mDownloadDir); return true; }
bool CatchupWork::downloadLedgers(CheckpointRange const& range) { if (mDownloadLedgersWork) { assert(mDownloadLedgersWork->getState() == WORK_SUCCESS); return false; } CLOG(INFO, "History") << "Catchup downloading ledger chain for checkpointRange [" << range.first() << ".." << range.last() << "]"; mDownloadLedgersWork = addWork<BatchDownloadWork>( range, HISTORY_FILE_TYPE_LEDGER, *mDownloadDir); return true; }