mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix startup error with --import
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/core/DatabaseCon.h>
|
||||
#include <ripple/core/Stoppable.h>
|
||||
#include <ripple/app/consensus/RCLValidations.h>
|
||||
#include <ripple/app/main/DBInit.h>
|
||||
#include <ripple/app/main/BasicApp.h>
|
||||
@@ -930,21 +931,31 @@ public:
|
||||
if (config_->doImport)
|
||||
{
|
||||
auto j = logs_->journal("NodeObject");
|
||||
NodeStore::DummyScheduler scheduler;
|
||||
NodeStore::DummyScheduler dummyScheduler;
|
||||
RootStoppable dummyRoot {"DummyRoot"};
|
||||
std::unique_ptr <NodeStore::Database> source =
|
||||
NodeStore::Manager::instance().make_Database(
|
||||
"NodeStore.import",
|
||||
scheduler,
|
||||
dummyScheduler,
|
||||
0,
|
||||
*m_jobQueue,
|
||||
dummyRoot,
|
||||
config_->section(ConfigSection::importNodeDatabase()),
|
||||
j);
|
||||
|
||||
JLOG(j.warn()) <<
|
||||
"Node import from '" << source->getName() << "' to '" <<
|
||||
getNodeStore().getName() << "'.";
|
||||
"Starting node import from '" << source->getName() <<
|
||||
"' to '" << getNodeStore().getName() << "'.";
|
||||
|
||||
using namespace std::chrono;
|
||||
auto const start = steady_clock::now();
|
||||
|
||||
getNodeStore().import(*source);
|
||||
|
||||
auto const elapsed = duration_cast <seconds>
|
||||
(steady_clock::now() - start);
|
||||
JLOG(j.warn()) <<
|
||||
"Node import from '" << source->getName() <<
|
||||
"' took " << elapsed.count() << " seconds.";
|
||||
}
|
||||
|
||||
// tune caches
|
||||
|
||||
Reference in New Issue
Block a user