aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 64ee5c3b8c..3ed880f600 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -189,6 +189,9 @@ bool CWallet::EncryptWallet(const string& strWalletPassphrase)
Lock();
}
+ if (Resilver(strWalletFile))
+ CWalletDB(strWalletFile, "r+").WriteSetting("fIsResilvered", true);
+
return true;
}
@@ -1142,6 +1145,13 @@ int CWallet::LoadWallet(bool& fFirstRunRet)
return false;
fFirstRunRet = false;
int nLoadWalletRet = CWalletDB(strWalletFile,"cr+").LoadWallet(this);
+ if (nLoadWalletRet == DB_NEED_RESILVER)
+ {
+ if (Resilver(strWalletFile))
+ CWalletDB(strWalletFile, "r+").WriteSetting("fIsResilvered", true);
+ nLoadWalletRet = DB_LOAD_OK;
+ }
+
if (nLoadWalletRet != DB_LOAD_OK)
return nLoadWalletRet;
fFirstRunRet = vchDefaultKey.empty();