Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
void UnloadWallets()
{
    auto wallets = GetWallets();
    while (!wallets.empty()) {
        auto wallet = wallets.back();
        wallets.pop_back();
        RemoveWallet(wallet);
        UnloadWallet(std::move(wallet));
    }
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
void WalletInit::Close() const
{
    for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
        RemoveWallet(pwallet);
    }
}
Ejemplo n.º 5
0
void WalletInit::Stop() const
{
    for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
        pwallet->Flush(true);
    }
}
Ejemplo n.º 6
0
void WalletInit::Flush() const
{
    for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
        pwallet->Flush(false);
    }
}
Ejemplo n.º 7
0
void StopWallets()
{
    for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
        pwallet->Flush(true);
    }
}
Ejemplo n.º 8
0
void FlushWallets()
{
    for (const std::shared_ptr<CWallet>& pwallet : GetWallets()) {
        pwallet->Flush(false);
    }
}