Consensus: Add asset type to CTxOut and validation

This commit is contained in:
Gregory Sanders 2016-12-01 09:34:31 -05:00
parent c63b8e9803
commit 05bc6db085
19 changed files with 196 additions and 90 deletions

View file

@ -177,6 +177,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn)
coinbaseTx.vout.resize(1);
coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn;
coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
coinbaseTx.vout[0].nAsset = BITCOINID;
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
pblock->vtx[0] = coinbaseTx;
pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());