aboutsummaryrefslogtreecommitdiff
path: root/src/walletdb.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-02-18 15:23:24 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-07 09:20:11 +0100
commit09ec3af16687aa301a921a1a6e94d7a57d4af141 (patch)
tree7fea9f9994827e4b6156f59484d13eef906d6708 /src/walletdb.cpp
parentc7c32627742575afeadca636df09e7014135e27b (diff)
AddToWallet implies BindWallet
Now that AddToWallet is called when loading transactions from the wallet database, BindWallet can be integrated into that and does not need to be an extra step. Leaves behaviour unchanged, but makes the fFromLoadWallet/!fFromLoadWallet paths in AddToWallet a bit more symmetric.
Diffstat (limited to 'src/walletdb.cpp')
-rw-r--r--src/walletdb.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index b57ea0b518..359a1cef61 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -352,9 +352,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
CWalletTx wtx;
ssValue >> wtx;
CValidationState state;
- if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid())
- wtx.BindWallet(pwallet);
- else
+ if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
return false;
// Undo serialize changes in 31600