From 30a0d1e311b7e18b9cafeb3375135bcf12a938ce Mon Sep 17 00:00:00 2001 From: clemahieu Date: Sat, 13 Apr 2024 20:34:44 +0100 Subject: [PATCH] Use memory weight instead of exact weight. (#4555) --- nano/node/wallet.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nano/node/wallet.cpp b/nano/node/wallet.cpp index 696d7b4b68..922edd4abc 100644 --- a/nano/node/wallet.cpp +++ b/nano/node/wallet.cpp @@ -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