mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
rawissueasset: don't make explicit 0-value which gets blinded later
This commit is contained in:
parent
1b78b9f222
commit
d710cb5880
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());
|
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
|
// 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) {
|
if (token_amount > 0) {
|
||||||
|
mtx.vin[issuance_input_index].assetIssuance.nInflationKeys = token_amount;
|
||||||
mtx.vout.insert(mtx.vout.begin()+token_place, token_out);
|
mtx.vout.insert(mtx.vout.begin()+token_place, token_out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue