MCPcopy Create free account
hub / github.com/ElementsProject/elements / StartWallets

Function StartWallets

src/wallet/load.cpp:141–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void StartWallets(WalletContext& context, CScheduler& scheduler)
142{
143 for (const std::shared_ptr<CWallet>& pwallet : GetWallets(context)) {
144 pwallet->postInitProcess();
145 }
146
147 // Schedule periodic wallet flushes and tx rebroadcasts
148 if (context.args->GetBoolArg("-flushwallet", DEFAULT_FLUSHWALLET)) {
149 scheduler.scheduleEvery([&context] { MaybeCompactWalletDB(context); }, std::chrono::milliseconds{500});
150 }
151 scheduler.scheduleEvery([&context] { MaybeResendWalletTxs(context); }, std::chrono::milliseconds{1000});
152}
153
154void FlushWallets(WalletContext& context)
155{

Callers 1

startMethod · 0.85

Calls 6

GetWalletsFunction · 0.85
MaybeCompactWalletDBFunction · 0.85
MaybeResendWalletTxsFunction · 0.85
postInitProcessMethod · 0.80
GetBoolArgMethod · 0.80
scheduleEveryMethod · 0.80

Tested by

no test coverage detected