chaingen: fixed few bugs in construct_tx_with_many_outputs() and put_alias_via_tx_to_list()
This commit is contained in:
parent
02138c86a4
commit
8a8477656d
2 changed files with 2 additions and 2 deletions
|
|
@ -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 */)
|
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;
|
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");
|
CHECK_AND_ASSERT_MES(r, false, "fill_tx_sources failed");
|
||||||
|
|
||||||
std::vector<currency::tx_destination_entry> destinations;
|
std::vector<currency::tx_destination_entry> destinations;
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ inline bool put_alias_via_tx_to_list(const currency::hard_forks_descriptor& hf,
|
||||||
for(auto& el : destinations)
|
for(auto& el : destinations)
|
||||||
{
|
{
|
||||||
if (el.addr.front() == reward_acc.get_public_address())
|
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)
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue