Changeset View
Changeset View
Standalone View
Standalone View
src/test/util/setup_common.cpp
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | if (RPCIsInWarmup(&rpcWarmupStatus)) { | ||||
SetRPCWarmupFinished(); | SetRPCWarmupFinished(); | ||||
} | } | ||||
m_node.scheduler = std::make_unique<CScheduler>(); | m_node.scheduler = std::make_unique<CScheduler>(); | ||||
// We have to run a scheduler thread to prevent ActivateBestChain | // We have to run a scheduler thread to prevent ActivateBestChain | ||||
// from blocking due to queue overrun. | // from blocking due to queue overrun. | ||||
threadGroup.create_thread([&] { m_node.scheduler->serviceQueue(); }); | threadGroup.create_thread([&] { m_node.scheduler->serviceQueue(); }); | ||||
GetMainSignals().RegisterBackgroundSignalScheduler(*g_rpc_node->scheduler); | GetMainSignals().RegisterBackgroundSignalScheduler(*m_node.scheduler); | ||||
pblocktree.reset(new CBlockTreeDB(1 << 20, true)); | pblocktree.reset(new CBlockTreeDB(1 << 20, true)); | ||||
g_chainstate = std::make_unique<CChainState>(); | g_chainstate = std::make_unique<CChainState>(); | ||||
::ChainstateActive().InitCoinsDB( | ::ChainstateActive().InitCoinsDB( | ||||
/* cache_size_bytes */ 1 << 23, /* in_memory */ true, | /* cache_size_bytes */ 1 << 23, /* in_memory */ true, | ||||
/* should_wipe */ false); | /* should_wipe */ false); | ||||
assert(!::ChainstateActive().CanFlushToDisk()); | assert(!::ChainstateActive().CanFlushToDisk()); | ||||
::ChainstateActive().InitCoinsCache(); | ::ChainstateActive().InitCoinsCache(); | ||||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |