From cd68594dcdadc195bd2ea9394fa04edfdbdf1149 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 18 Sep 2019 15:56:01 -0400 Subject: [PATCH] Only check the hash of transactions loaded from disk --- src/wallet/walletdb.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 635997afc9..59101a1dd8 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -5,8 +5,6 @@ #include -#include -#include #include #include #include @@ -218,8 +216,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, ssKey >> hash; CWalletTx wtx(nullptr /* pwallet */, MakeTransactionRef()); ssValue >> wtx; - CValidationState state; - if (!(CheckTransaction(*wtx.tx, state) && (wtx.GetHash() == hash) && state.IsValid())) + if (wtx.GetHash() != hash) return false; // Undo serialize changes in 31600