Skip to content

Commit

Permalink
rawissueasset: don't make explicit 0-value which gets blinded later
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Jun 5, 2019
1 parent 1b78b9f commit d710cb5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit d710cb5

Please sign in to comment.