Add stake consistency enforcement and near complete CoinbaseGuard validation

This commit is contained in:
miketout
2018-10-05 14:51:37 -07:00
parent 3bfa5e2264
commit f3b0d2ab4e
4 changed files with 86 additions and 50 deletions

View File

@@ -494,7 +494,7 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
// if there is a specific destination, use it
CTransaction stakeTx = pblock->vtx[pblock->vtx.size() - 1];
CStakeParams p;
if (ValidateStakeTransaction(stakeTx, p))
if (ValidateStakeTransaction(stakeTx, p, false))
{
if (!p.pk.IsValid() || !MakeGuardedOutput(txNew.vout[0].nValue, p.pk, stakeTx, txNew.vout[0]))
{