Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
drov0 authored and dnotestein committed Jan 26, 2025
1 parent b6e7ff8 commit 01ddc19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/tests/hf28_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 01ddc19

Please sign in to comment.