diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2011-11-10 21:29:23 +0100 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2011-11-15 10:03:31 -0500 |
commit | 00eae584a26295dbf7b1aebf99c1b8a4c9a86c37 (patch) | |
tree | f6a6b4b3386d1aa64d8fb497c6eaaabf5a5d97fc /src/wallet.cpp | |
parent | ef4280e08b217bf2512bb1878e1dd2a926e557c9 (diff) | |
download | bitcoin-00eae584a26295dbf7b1aebf99c1b8a4c9a86c37.tar.xz |
Resilvering
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 298a2c6428..924700d027 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -190,6 +190,9 @@ bool CWallet::EncryptWallet(const string& strWalletPassphrase) Lock(); } + if (Resilver(strWalletFile)) + CWalletDB(strWalletFile, "r+").WriteSetting("fIsResilvered", true); + return true; } @@ -1122,6 +1125,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(); |