Skip to content

Commit

Permalink
Use memory weight instead of exact weight. (nanocurrency#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu authored Apr 13, 2024
1 parent 06ef24b commit 30a0d1e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions nano/node/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1644,12 +1644,7 @@ nano::wallet_representatives nano::wallets::reps () const

bool nano::wallets::check_rep (nano::account const & account_a, nano::uint128_t const & half_principal_weight_a, bool const acquire_lock_a)
{
nano::uint128_t weight;
{
auto ledger_txn{ node.ledger.store.tx_begin_read () };
weight = node.ledger.weight_exact (ledger_txn, account_a);
}

auto weight = node.ledger.weight (account_a);
if (weight < node.config.vote_minimum.number ())
{
return false; // account not a representative
Expand Down

0 comments on commit 30a0d1e

Please sign in to comment.