Merge pull request #3701

09ec3af AddToWallet implies BindWallet (Wladimir J. van der Laan)
This commit is contained in:
Wladimir J. van der Laan committed 2014-04-19 08:51:40 +02:00
commit 913e90db9a
2 files changed
+2 -3

No files matched your search

+1
View File
@@ -471,6 +471,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
if (fFromLoadWallet) if (fFromLoadWallet)
{ {
mapWallet[hash] = wtxIn; mapWallet[hash] = wtxIn;
mapWallet[hash].BindWallet(this);
AddToSpends(hash); AddToSpends(hash);
} }
else else
+1 -3
View File
@@ -352,9 +352,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
CWalletTx wtx; CWalletTx wtx;
ssValue >> wtx; ssValue >> wtx;
CValidationState state; CValidationState state;
if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()) if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
wtx.BindWallet(pwallet);
else
return false; return false;
// Undo serialize changes in 31600 // Undo serialize changes in 31600