| 139 | } |
| 140 | |
| 141 | void 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 | |
| 154 | void FlushWallets(WalletContext& context) |
| 155 | { |
no test coverage detected