aboutsummaryrefslogtreecommitdiff
path: root/src/walletdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/walletdb.cpp')
-rw-r--r--src/walletdb.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 2282bed18a..fe9bce21e8 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -203,7 +203,8 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
ssKey >> hash;
CWalletTx& wtx = pwallet->mapWallet[hash];
ssValue >> wtx;
- if (wtx.CheckTransaction() && (wtx.GetHash() == hash))
+ CValidationState state;
+ if (wtx.CheckTransaction(state) && (wtx.GetHash() == hash) && state.IsValid())
wtx.BindWallet(pwallet);
else
{