Staking improvement

This commit is contained in:
Michael Toutonghi
2018-05-22 13:40:16 -07:00
parent 30ceed219d
commit cd230e37ff
2 changed files with 11 additions and 5 deletions

View File

@@ -463,6 +463,10 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, bool isStake)
siglen = verus_staked(key, txStaked, nBitsPOS, posHash, utxosig);
blocktime = GetAdjustedTime();
pblock->SetVerusPOSTarget(nBitsPOS);
// change the scriptPubKeyIn to the same output script exactly as the staking transaction
if (siglen > 0)
scriptPubKeyIn = CScript(txStaked.vout[0].scriptPubKey);
}
else
{