Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,070 Lines • ▼ Show 20 Lines | bool AppInitMain(Config &config, RPCServer &rpcServer, | ||||
} | } | ||||
// Start the lightweight task scheduler thread | // Start the lightweight task scheduler thread | ||||
CScheduler::Function serviceLoop = | CScheduler::Function serviceLoop = | ||||
std::bind(&CScheduler::serviceQueue, &scheduler); | std::bind(&CScheduler::serviceQueue, &scheduler); | ||||
threadGroup.create_thread(std::bind(&TraceThread<CScheduler::Function>, | threadGroup.create_thread(std::bind(&TraceThread<CScheduler::Function>, | ||||
"scheduler", serviceLoop)); | "scheduler", serviceLoop)); | ||||
// Gather some entropy once per minute. | |||||
scheduler.scheduleEvery( | |||||
[] { | |||||
RandAddPeriodic(); | |||||
return true; | |||||
}, | |||||
60000); | |||||
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler); | GetMainSignals().RegisterBackgroundSignalScheduler(scheduler); | ||||
GetMainSignals().RegisterWithMempoolSignals(g_mempool); | GetMainSignals().RegisterWithMempoolSignals(g_mempool); | ||||
// Create client interfaces for wallets that are supposed to be loaded | // Create client interfaces for wallets that are supposed to be loaded | ||||
// according to -wallet and -disablewallet options. This only constructs | // according to -wallet and -disablewallet options. This only constructs | ||||
// the interfaces, it doesn't load wallet data. Wallets actually get loaded | // the interfaces, it doesn't load wallet data. Wallets actually get loaded | ||||
// when load() and start() interface methods are called below. | // when load() and start() interface methods are called below. | ||||
g_wallet_init_interface.Construct(node); | g_wallet_init_interface.Construct(node); | ||||
▲ Show 20 Lines • Show All 622 Lines • Show Last 20 Lines |