Skip to content

Commit 913e90d

Browse files
committed
Merge pull request #3701
09ec3af AddToWallet implies BindWallet (Wladimir J. van der Laan)
2 parents fe451fe + 09ec3af commit 913e90d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
471471
if (fFromLoadWallet)
472472
{
473473
mapWallet[hash] = wtxIn;
474+
mapWallet[hash].BindWallet(this);
474475
AddToSpends(hash);
475476
}
476477
else

src/walletdb.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
352352
CWalletTx wtx;
353353
ssValue >> wtx;
354354
CValidationState state;
355-
if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid())
356-
wtx.BindWallet(pwallet);
357-
else
355+
if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
358356
return false;
359357

360358
// Undo serialize changes in 31600

0 commit comments

Comments
 (0)