void WalletInit::Start(CScheduler& scheduler) const { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->postInitProcess(); } // Run a thread to flush wallet periodically scheduler.scheduleEvery(MaybeCompactWalletDB, 500); }
void UnloadWallets() { auto wallets = GetWallets(); while (!wallets.empty()) { auto wallet = wallets.back(); wallets.pop_back(); RemoveWallet(wallet); UnloadWallet(std::move(wallet)); } }
void StartWallets(CScheduler& scheduler) { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->postInitProcess(); } // Schedule periodic wallet flushes and tx rebroadcasts scheduler.scheduleEvery(MaybeCompactWalletDB, 500); scheduler.scheduleEvery(MaybeResendWalletTxs, 1000); }
void WalletInit::Close() const { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { RemoveWallet(pwallet); } }
void WalletInit::Stop() const { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->Flush(true); } }
void WalletInit::Flush() const { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->Flush(false); } }
void StopWallets() { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->Flush(true); } }
void FlushWallets() { for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) { pwallet->Flush(false); } }