diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index 8ce14334..96d55b46 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -2288,7 +2288,7 @@ namespace currency gen_context.ao_amount_blinding_mask = crypto::hash_helper_t::hs(CRYPTO_HDS_ASSET_CONTROL_ABM, tx_key.sec); gen_context.ao_commitment_in_outputs = true; - // set correct asset_id to the corresponding destination entries + // calculate the amount of asset being burnt using asset_id field in inputs and outputs (sources and destinations) uint64_t amount_of_burned_assets = 0; for (auto& item : ftp.sources) { @@ -2343,7 +2343,7 @@ namespace currency } if (ado.version < ASSET_DESCRIPTOR_BASE_HF5_VER) { - CHECK_AND_ASSERT_THROW_MES(ado.opt_descriptor.has_value(), "Internal error: opt_descriptor unset during ASSET_DESCRIPTOR_OPERATION_PUBLIC_BURN for version less then 2"); + CHECK_AND_ASSERT_THROW_MES(ado.opt_descriptor.has_value(), "Internal error: opt_descriptor unset during ASSET_DESCRIPTOR_OPERATION_EMIT for version less then 2"); ado.opt_descriptor->current_supply += amount_of_emitted_asset; } else diff --git a/tests/core_tests/multiassets_test.cpp b/tests/core_tests/multiassets_test.cpp index bef240c0..c7b13844 100644 --- a/tests/core_tests/multiassets_test.cpp +++ b/tests/core_tests/multiassets_test.cpp @@ -1413,7 +1413,6 @@ bool eth_signed_asset_basics::generate(std::vector& events) co m_accounts.resize(TOTAL_ACCS_COUNT); account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& alice_acc = m_accounts[ALICE_ACC_IDX]; alice_acc.generate(); alice_acc.set_createtime(ts); - miner_acc.generate(); MAKE_GENESIS_BLOCK(events, blk_0, miner_acc, ts); DO_CALLBACK(events, "configure_core"); // default configure_core callback will initialize core runtime config with m_hardforks @@ -1627,7 +1626,6 @@ bool eth_signed_asset_via_rpc::generate(std::vector& events) c account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& alice_acc = m_accounts[ALICE_ACC_IDX]; alice_acc.generate(); alice_acc.set_createtime(ts); account_base& bob_acc = m_accounts[BOB_ACC_IDX]; bob_acc.generate(); bob_acc.set_createtime(ts); - miner_acc.generate(); MAKE_GENESIS_BLOCK(events, blk_0, miner_acc, ts); DO_CALLBACK(events, "configure_core"); // default configure_core callback will initialize core runtime config with m_hardforks @@ -2420,7 +2418,6 @@ bool several_asset_emit_burn_txs_in_pool::generate(std::vector m_accounts.resize(TOTAL_ACCS_COUNT); account_base& miner_acc = m_accounts[MINER_ACC_IDX]; miner_acc.generate(); miner_acc.set_createtime(ts); account_base& alice_acc = m_accounts[ALICE_ACC_IDX]; alice_acc.generate(); alice_acc.set_createtime(ts); - miner_acc.generate(); MAKE_GENESIS_BLOCK(events, blk_0, miner_acc, ts); // rebuild genesis miner tx