From 913ef54c22180ae71b848537536ea5dc12726269 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sun, 22 Oct 2017 16:15:14 +0200 Subject: [PATCH] Store cache on exit --- src/libwalletqt/Wallet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 5a71debf..fcd0dbae 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -643,6 +643,12 @@ Wallet::~Wallet() delete m_history; m_history = NULL; //Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); + if(status() == Status_Critical) + qDebug("Not storing wallet cache"); + else if( m_walletImpl->store("")) + qDebug("Wallet cache stored successfully"); + else + qDebug("Error storing wallet cache"); delete m_walletImpl; m_walletImpl = NULL; qDebug("m_walletImpl deleted");