Skip to content

Seemingly useless assignment in reissueasset_base() #821

@dgpv

Description

@dgpv

mtx.vin[issuance_input_index].assetIssuance.assetEntropy = entropy;
mtx.vin[issuance_input_index].assetIssuance.assetBlindingNonce = asset_blinder;
mtx.vin[issuance_input_index].assetIssuance.nAmount = asset_amount;
// Place assets into randomly placed output slots, before change output, inserted in place
assert(mtx.vout.size() >= 1);
int asset_place = GetRandInt(mtx.vout.size()-1);
CTxOut asset_out(asset, asset_amount, asset_destination);
// If blinded address, insert the pubkey into the nonce field for later substitution by blinding
if (IsBlindDestination(asset_address)) {
CPubKey asset_blind = GetDestinationBlindingKey(asset_address);
asset_out.nNonce.vchCommitment = std::vector<unsigned char>(asset_blind.begin(), asset_blind.end());
}
assert(asset_amount > 0);
mtx.vout.insert(mtx.vout.begin()+asset_place, asset_out);
mtx.vin[issuance_input_index].assetIssuance.nAmount = asset_amount;

the assignment

mtx.vin[issuance_input_index].assetIssuance.nAmount = asset_amount;

at line 2912 is the same as the assignment at line 2898
neither asset_amount nor assetIssuance.nAmount seem to be modified between the lines.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions