From 8a8477656d7efc8a396bc258b2048a4c56a040b3 Mon Sep 17 00:00:00 2001 From: sowle Date: Sun, 6 Aug 2023 01:28:18 +0200 Subject: [PATCH] chaingen: fixed few bugs in construct_tx_with_many_outputs() and put_alias_via_tx_to_list() --- tests/core_tests/chaingen.cpp | 2 +- tests/core_tests/chaingen_helpers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index cbe45b52..0a8c2bd2 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -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 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 destinations; diff --git a/tests/core_tests/chaingen_helpers.h b/tests/core_tests/chaingen_helpers.h index 1c63493c..fd3994ab 100644 --- a/tests/core_tests/chaingen_helpers.h +++ b/tests/core_tests/chaingen_helpers.h @@ -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)