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

@ -250,7 +250,7 @@ static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
CScript scriptPubKey = GetScriptForDestination(addr.Get());
// construct TxOut, append to transaction output list
CTxOut txout(value, scriptPubKey);
CTxOut txout(BITCOINID, value, scriptPubKey);
if (addr.IsBlinded()) {
CPubKey pubkey = addr.GetBlindingKey();
txout.nValue.vchNonceCommitment = std::vector<unsigned char>(pubkey.begin(), pubkey.end());
@ -284,7 +284,7 @@ static void MutateTxAddOutData(CMutableTransaction& tx, const string& strInput)
std::vector<unsigned char> data = ParseHex(strData);
CTxOut txout(value, CScript() << OP_RETURN << data);
CTxOut txout(BITCOINID, value, CScript() << OP_RETURN << data);
tx.vout.push_back(txout);
tx.nTxFee -= value;
}
@ -353,7 +353,7 @@ static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput
CScript scriptPubKey = ParseScript(strScript); // throws on err
// construct TxOut, append to transaction output list
CTxOut txout(value, scriptPubKey);
CTxOut txout(BITCOINID, value, scriptPubKey);
tx.vout.push_back(txout);
tx.nTxFee -= value;
}