Improve bootstrap for accounts with public key equal to existing block hash (#2400)
This commit is contained in:
		
					parent
					
						
							
								3a2caa9573
							
						
					
				
			
			
				commit
				
					
						5295cf63ea
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -56,14 +56,14 @@ void nano::bulk_pull_client::request ()
 | 
			
		|||
	assert (!pull.head.is_zero () || pull.retry_limit != std::numeric_limits<unsigned>::max ());
 | 
			
		||||
	expected = pull.head;
 | 
			
		||||
	nano::bulk_pull req;
 | 
			
		||||
	if (pull.head == pull.head_original)
 | 
			
		||||
	if (pull.head == pull.head_original && pull.attempts % 4 < 3)
 | 
			
		||||
	{
 | 
			
		||||
		// Account for new pulls
 | 
			
		||||
		req.start = pull.account_or_head;
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		// Head for cached pulls
 | 
			
		||||
		// Head for cached pulls or accounts with public key equal to existing block hash (25% of attempts)
 | 
			
		||||
		req.start = pull.head;
 | 
			
		||||
	}
 | 
			
		||||
	req.end = pull.end;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue