Set fCoinStake for view tx in ApplyTxInUndo

Prevents possible DB corruption.
This commit is contained in:
Justin
2020-05-31 19:13:12 -04:00
parent 4e9af875c9
commit afc9201fb9

View File

@@ -2215,6 +2215,7 @@ static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const CO
fClean = fClean && error("%s: undo data overwriting existing transaction", __func__);
coins->Clear();
coins->fCoinBase = undo.fCoinBase;
coins->fCoinStake = undo.fCoinStake;
coins->nHeight = undo.nHeight;
coins->nVersion = undo.nVersion;
coins->nTime = undo.nTime;