[Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..)

This commit is contained in:
Cozz Lovan
2014-08-31 05:55:27 +02:00
parent 29f96e8bc6
commit 44bc988e7b
8 changed files with 30 additions and 19 deletions

View File

@@ -1177,6 +1177,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();
@@ -1192,7 +1194,7 @@ bool AppInit2(boost::thread_group& threadGroup)
copyTo->fFromMe = copyFrom->fFromMe;
copyTo->strFromAccount = copyFrom->strFromAccount;
copyTo->nOrderPos = copyFrom->nOrderPos;
copyTo->WriteToDisk();
copyTo->WriteToDisk(&walletdb);
}
}
}