diff --git a/reporting/ReportingETL.cpp b/reporting/ReportingETL.cpp index 7f8a357a..02806fe0 100644 --- a/reporting/ReportingETL.cpp +++ b/reporting/ReportingETL.cpp @@ -126,8 +126,12 @@ ReportingETL::loadInitialLedger(uint32_t startingSequence) if (!stopping_) { - flatMapBackend_.sync(); - writeToPostgres(lgrInfo, accountTxData, pgPool_); + for (auto& data : accountTxData) + { + flatMapBackend_.storeAccountTx(std::move(data)); + } + bool success = flatMapBackend_.writeLedger( + lgrInfo, std::move(*ledgerData->mutable_ledger_header())); } auto end = std::chrono::system_clock::now(); BOOST_LOG_TRIVIAL(debug) << "Time to download and store ledger = "