mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Consensus: Add asset type to CTxOut and validation
This commit is contained in:
parent
c63b8e9803
commit
05bc6db085
19 changed files with 196 additions and 90 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue