From 01ddc19a25644908d9b2ab066ac6ee0fc7bd963f Mon Sep 17 00:00:00 2001 From: Howo Date: Sun, 19 Jan 2025 13:50:32 -0500 Subject: [PATCH] fix typo --- libraries/chain/database.cpp | 4 ++-- tests/unit/tests/hf28_tests.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/chain/database.cpp b/libraries/chain/database.cpp index 604585be60..365067c556 100644 --- a/libraries/chain/database.cpp +++ b/libraries/chain/database.cpp @@ -2731,8 +2731,8 @@ void database::process_funds() auto new_hive = (props.virtual_supply.amount * current_inflation_rate) / (int64_t(HIVE_100_PERCENT) * int64_t(HIVE_BLOCKS_PER_YEAR)); if (has_hardfork(HIVE_HARDFORK_1_28)) { const auto &treasury_account = get_treasury(); - const auto hdb_supply_without_treasury = (props.get_current_hbd_supply() - treasury_account.hbd_balance).amount < 0 ? asset(0, HBD_SYMBOL) : (props.get_current_hbd_supply() - treasury_account.hbd_balance); - const auto virtual_supply_without_treasury = hdb_supply_without_treasury * get_feed_history().current_median_history + props.current_supply; + const auto hbd_supply_without_treasury = (props.get_current_hbd_supply() - treasury_account.hbd_balance).amount < 0 ? asset(0, HBD_SYMBOL) : (props.get_current_hbd_supply() - treasury_account.hbd_balance); + const auto virtual_supply_without_treasury = hbd_supply_without_treasury * get_feed_history().current_median_history + props.current_supply; new_hive = (virtual_supply_without_treasury.amount * current_inflation_rate) / (int64_t(HIVE_100_PERCENT) * int64_t(HIVE_BLOCKS_PER_YEAR)); } diff --git a/tests/unit/tests/hf28_tests.cpp b/tests/unit/tests/hf28_tests.cpp index a456ccf388..acdba95f95 100644 --- a/tests/unit/tests/hf28_tests.cpp +++ b/tests/unit/tests/hf28_tests.cpp @@ -2314,8 +2314,8 @@ BOOST_AUTO_TEST_CASE(treasury_hbd_does_not_affect_inflation_advanced) auto new_hive = (props.virtual_supply.amount * current_inflation_rate) / (int64_t(HIVE_100_PERCENT) * int64_t(HIVE_BLOCKS_PER_YEAR)); if (db->has_hardfork(HIVE_HARDFORK_1_28)) { const auto &treasury_account = db->get_treasury(); - const auto hdb_supply_without_treasury = (props.get_current_hbd_supply() - treasury_account.hbd_balance).amount < 0 ? asset(0, HBD_SYMBOL) : (props.get_current_hbd_supply() - treasury_account.hbd_balance); - const auto virtual_supply_without_treasury = hdb_supply_without_treasury * db->get_feed_history().current_median_history + props.current_supply; + const auto hbd_supply_without_treasury = (props.get_current_hbd_supply() - treasury_account.hbd_balance).amount < 0 ? asset(0, HBD_SYMBOL) : (props.get_current_hbd_supply() - treasury_account.hbd_balance); + const auto virtual_supply_without_treasury = hbd_supply_without_treasury * db->get_feed_history().current_median_history + props.current_supply; new_hive = (virtual_supply_without_treasury.amount * current_inflation_rate) / (int64_t(HIVE_100_PERCENT) * int64_t(HIVE_BLOCKS_PER_YEAR)); }