Use memory weight instead of exact weight. (#4555)
This commit is contained in:
		
					parent
					
						
							
								06ef24b196
							
						
					
				
			
			
				commit
				
					
						30a0d1e311
					
				
			
		
					 1 changed files with 1 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue