From b669990a8aea9e0c3af940a45717c93865af4928 Mon Sep 17 00:00:00 2001 From: sowle Date: Mon, 28 Aug 2023 19:49:13 +0200 Subject: [PATCH] small typo fixed ("amount_to_validate") --- src/currency_core/blockchain_storage.cpp | 8 ++++---- src/currency_core/currency_format_utils.cpp | 2 +- src/currency_core/currency_format_utils.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index 9759d519..a722ccbe 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -3842,7 +3842,7 @@ bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::has avc.asset_op_history = m_db_assets.find(avc.asset_id); CHECK_AND_ASSERT_MES(!avc.asset_op_history, false, "asset with id " << avc.asset_id << " has already been registered"); - avc.amout_to_validate = ado.descriptor.current_supply; + avc.amount_to_validate = ado.descriptor.current_supply; CHECK_AND_ASSERT_MES(validate_asset_operation_balance_proof(avc), false, "asset operation validation failed!"); assets_container::t_value_type local_asset_history = AUTO_VAL_INIT(local_asset_history); @@ -3867,7 +3867,7 @@ bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::has CHECK_AND_ASSERT_MES(r, false, "Faild to validate ownership of asset_descriptor_operation, rejecting"); } - avc.amout_to_validate = 0; + avc.amount_to_validate = 0; bool need_to_validate_balance_proof = true; if (ado.operation_type == ASSET_DESCRIPTOR_OPERATION_UPDATE) { @@ -3882,7 +3882,7 @@ bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::has CHECK_AND_ASSERT_MES(ado.descriptor.current_supply > avc.asset_op_history->back().descriptor.current_supply, false, "emmit operation not increasing emission, failed"); CHECK_AND_ASSERT_MES(validate_ado_update_allowed(ado.descriptor, avc.asset_op_history->back().descriptor), false, "emmit operation not allow to update fields"); CHECK_AND_ASSERT_MES(ado.descriptor.meta_info == avc.asset_op_history->back().descriptor.meta_info, false, "emmit operation not not allow to update meta info"); - avc.amout_to_validate = ado.descriptor.current_supply - avc.asset_op_history->back().descriptor.current_supply; + avc.amount_to_validate = ado.descriptor.current_supply - avc.asset_op_history->back().descriptor.current_supply; } else if (ado.operation_type == ASSET_DESCRIPTOR_OPERATION_PUBLIC_BURN) { @@ -3890,7 +3890,7 @@ bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::has CHECK_AND_ASSERT_MES(validate_ado_update_allowed(ado.descriptor, avc.asset_op_history->back().descriptor), false, "burn operation not allow to update fields"); CHECK_AND_ASSERT_MES(ado.descriptor.meta_info == avc.asset_op_history->back().descriptor.meta_info, false, "burn operation not not allow to update meta info"); - avc.amout_to_validate = avc.asset_op_history->back().descriptor.current_supply - ado.descriptor.current_supply; + avc.amount_to_validate = avc.asset_op_history->back().descriptor.current_supply - ado.descriptor.current_supply; } else diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index 331ac86d..7760fbe9 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -577,7 +577,7 @@ namespace currency // make sure that amount commitment corresponds to opt_amount_commitment_g_proof CHECK_AND_ASSERT_MES(context.ado.opt_amount_commitment.has_value(), false, "opt_amount_commitment is absent"); CHECK_AND_ASSERT_MES(aop.opt_amount_commitment_g_proof.has_value(), false, "opt_amount_commitment_g_proof is absent"); - crypto::point_t A = crypto::point_t(context.ado.opt_amount_commitment.get()).modify_mul8() - context.amout_to_validate * context.asset_id_pt; + crypto::point_t A = crypto::point_t(context.ado.opt_amount_commitment.get()).modify_mul8() - context.amount_to_validate * context.asset_id_pt; bool r = crypto::check_signature(context.tx_id, A.to_public_key(), aop.opt_amount_commitment_g_proof.get()); CHECK_AND_ASSERT_MES(r, false, "opt_amount_commitment_g_proof check failed"); diff --git a/src/currency_core/currency_format_utils.h b/src/currency_core/currency_format_utils.h index cfae779f..2fc557eb 100644 --- a/src/currency_core/currency_format_utils.h +++ b/src/currency_core/currency_format_utils.h @@ -252,7 +252,7 @@ namespace currency const asset_descriptor_operation& ado; crypto::public_key asset_id = currency::null_pkey; crypto::point_t asset_id_pt = crypto::c_point_0; - uint64_t amout_to_validate = 0; + uint64_t amount_to_validate = 0; std::shared_ptr< const std::list > asset_op_history; };