mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge #649: rawissueasset: don't make explicit 0-value which gets blinded later
d710cb588 rawissueasset: don't make explicit 0-value which gets blinded later (Gregory Sanders)
Pull request description:
This matches the behavior of `issueasset`.
Resolves https://github.com/ElementsProject/elements/issues/643
Tree-SHA512: 655d84a45c686f31867eccaa423279bb81481b9321eb061a85af78f12a6652899ddd1c25357e36f1257e61af6c6d9b5b007d1615c18d7a4a826844102649fe45
This commit is contained in:
commit
335be0191b
1 changed files with 1 additions and 4 deletions
|
|
@ -2386,11 +2386,8 @@ void issueasset_base(CMutableTransaction& mtx, RawIssuanceDetails& issuance_deta
|
|||
token_out.nNonce.vchCommitment = std::vector<unsigned char>(token_blind.begin(), token_blind.end());
|
||||
}
|
||||
// Explicit 0 is represented by a null value, don't set to non-null in that case
|
||||
if (blind_issuance || token_amount != 0) {
|
||||
mtx.vin[issuance_input_index].assetIssuance.nInflationKeys = token_amount;
|
||||
}
|
||||
// Don't make zero value output(impossible by consensus)
|
||||
if (token_amount > 0) {
|
||||
mtx.vin[issuance_input_index].assetIssuance.nInflationKeys = token_amount;
|
||||
mtx.vout.insert(mtx.vout.begin()+token_place, token_out);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue