mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Only check the hash of transactions loaded from disk
This commit is contained in:
parent
59c138d2f1
commit
cd68594dcd
1 changed files with 1 additions and 4 deletions
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include <wallet/walletdb.h>
|
#include <wallet/walletdb.h>
|
||||||
|
|
||||||
#include <consensus/tx_check.h>
|
|
||||||
#include <consensus/validation.h>
|
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <protocol.h>
|
#include <protocol.h>
|
||||||
|
|
@ -218,8 +216,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||||
ssKey >> hash;
|
ssKey >> hash;
|
||||||
CWalletTx wtx(nullptr /* pwallet */, MakeTransactionRef());
|
CWalletTx wtx(nullptr /* pwallet */, MakeTransactionRef());
|
||||||
ssValue >> wtx;
|
ssValue >> wtx;
|
||||||
CValidationState state;
|
if (wtx.GetHash() != hash)
|
||||||
if (!(CheckTransaction(*wtx.tx, state) && (wtx.GetHash() == hash) && state.IsValid()))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Undo serialize changes in 31600
|
// Undo serialize changes in 31600
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue