Skip to content

Commit 5209c3f

Browse files
committed
[DB] Fix unserialization check for cold staking txes
1 parent 968931e commit 5209c3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wallet/walletdb.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,9 @@ bool ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, CW
486486
CWalletTx wtx;
487487
ssValue >> wtx;
488488
CValidationState state;
489-
// false because there is no reason to go through the zerocoin checks for our own wallet
490-
if (!(CheckTransaction(wtx, false, false, state) && (wtx.GetHash() == hash) && state.IsValid()))
489+
// fZerocoinActive false because there is no reason to go through the zerocoin checks for our own wallet
490+
// fColdStakingActive true to unserialize old P2CS outputs.
491+
if (!(CheckTransaction(wtx, false, false, state, false, true) && (wtx.GetHash() == hash) && state.IsValid()))
491492
return false;
492493

493494
// Undo serialize changes in 31600

0 commit comments

Comments
 (0)