Remove overload of ledger::amount that was only used in one test and didn't have a meaningful function. (#4436)

This commit is contained in:
clemahieu 2024-02-15 10:04:01 +00:00 committed by GitHub
commit c195663d89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 10 deletions

View file

@ -47,8 +47,6 @@ TEST (ledger, genesis_balance)
auto transaction = store.tx_begin_write ();
auto balance = ledger.account_balance (transaction, nano::dev::genesis->account ());
ASSERT_EQ (nano::dev::constants.genesis_amount, balance);
auto amount = ledger.amount (transaction, nano::dev::genesis->account ());
ASSERT_EQ (nano::dev::constants.genesis_amount, amount);
auto info = ledger.account_info (transaction, nano::dev::genesis->account ());
ASSERT_TRUE (info);
ASSERT_EQ (1, ledger.cache.account_count);

View file

@ -1192,13 +1192,6 @@ std::optional<nano::account_info> nano::ledger::account_info (store::transaction
return store.account.get (transaction, account);
}
// Return amount decrease or increase for block
nano::uint128_t nano::ledger::amount (store::transaction const & transaction_a, nano::account const & account_a)
{
release_assert (account_a == constants.genesis->account ());
return nano::dev::constants.genesis_amount;
}
nano::uint128_t nano::ledger::amount (store::transaction const & transaction_a, nano::block_hash const & hash_a)
{
auto block (store.block.get (transaction_a, hash_a));

View file

@ -45,7 +45,6 @@ public:
* Return account containing hash, returns zero account if account can not be found
*/
nano::account account_safe (store::transaction const &, nano::block_hash const &) const;
nano::uint128_t amount (store::transaction const &, nano::account const &);
nano::uint128_t amount (store::transaction const &, nano::block_hash const &);
/** Safe for previous block, but block hash_a must exist */
nano::uint128_t amount_safe (store::transaction const &, nano::block_hash const & hash_a, bool &) const;