0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-09 15:37:00 -04:00

Scale legacy sigop count in CreateNewBlock

Github-Pull: #8362
Rebased-From: 682aa0f289
This commit is contained in:
Suhas Daftuar 2016-07-18 12:40:28 -04:00 committed by Wladimir J. van der Laan
parent 73adfe3bb9
commit 86edc20a17
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -187,7 +187,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn)
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, chainparams.GetConsensus());
pblock->nNonce = 0;
pblocktemplate->vTxSigOpsCost[0] = GetLegacySigOpCount(pblock->vtx[0]);
pblocktemplate->vTxSigOpsCost[0] = WITNESS_SCALE_FACTOR * GetLegacySigOpCount(pblock->vtx[0]);
CValidationState state;
if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false)) {