aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-01-26 12:18:42 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-26 12:19:12 +0100
commit8204e19abed6c6ee8dca4a00943abfc52ea68fab (patch)
tree630099e9f695ed98b34cc0f4be992bb581c98a19 /src/init.cpp
parentb01a435c34f0669affece2b3d90f92c347588d69 (diff)
parent44bc988e7becb492a78ed92ea1052f4789012534 (diff)
Merge pull request #4805
44bc988 [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) (Cozz Lovan)
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index b58d1746e8..828c525dcb 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1211,6 +1211,8 @@ bool AppInit2(boost::thread_group& threadGroup)
// Restore wallet transaction metadata after -zapwallettxes=1
if (GetBoolArg("-zapwallettxes", false) && GetArg("-zapwallettxes", "1") != "2")
{
+ CWalletDB walletdb(strWalletFile);
+
BOOST_FOREACH(const CWalletTx& wtxOld, vWtx)
{
uint256 hash = wtxOld.GetHash();
@@ -1226,7 +1228,7 @@ bool AppInit2(boost::thread_group& threadGroup)
copyTo->fFromMe = copyFrom->fFromMe;
copyTo->strFromAccount = copyFrom->strFromAccount;
copyTo->nOrderPos = copyFrom->nOrderPos;
- copyTo->WriteToDisk();
+ copyTo->WriteToDisk(&walletdb);
}
}
}