1
0
Fork 0
forked from lthn/blockchain

chaingen: fixed few bugs in construct_tx_with_many_outputs() and put_alias_via_tx_to_list()

This commit is contained in:
sowle 2023-08-06 01:28:18 +02:00
parent 02138c86a4
commit 8a8477656d
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 2 additions and 2 deletions

View file

@ -1775,7 +1775,7 @@ bool construct_tx_with_many_outputs(const currency::hard_forks_descriptor& hf, s
uint64_t total_amount, size_t outputs_count, uint64_t fee, currency::transaction& tx, bool use_ref_by_id /* = false */)
{
std::vector<currency::tx_source_entry> sources;
bool r = fill_tx_sources(sources, events, blk_head, keys_from, total_amount + fee, 0, true, false, use_ref_by_id);
bool r = fill_tx_sources(sources, events, blk_head, keys_from, total_amount + fee, 0, true, true, use_ref_by_id);
CHECK_AND_ASSERT_MES(r, false, "fill_tx_sources failed");
std::vector<currency::tx_destination_entry> destinations;

View file

@ -307,7 +307,7 @@ inline bool put_alias_via_tx_to_list(const currency::hard_forks_descriptor& hf,
for(auto& el : destinations)
{
if (el.addr.front() == reward_acc.get_public_address())
el.flags |= currency::tx_destination_entry_flags::tdef_explicit_native_asset_id; // all alias-burn outputs must have explicit native asset id
el.flags |= currency::tx_destination_entry_flags::tdef_explicit_native_asset_id | currency::tx_destination_entry_flags::tdef_zero_amount_blinding_mask; // all alias-burn outputs must have explicit native asset id and zero amount mask
}
uint64_t tx_version = currency::get_tx_version(get_block_height(head_block) + 1, generator.get_hardforks()); // assuming the tx will be in the next block (head_block + 1)