mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-03 19:50:34 +01:00 
			
		
		
		
	roots: make sure transid_max's computed value isn't max
We check the result of transid_max_nocache(), but not the result of transid_max(). The latter is a computed result that is even more likely to be wrong[citation needed]. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
		@@ -515,7 +515,12 @@ BeesRoots::transid_max_nocache()
 | 
			
		||||
uint64_t
 | 
			
		||||
BeesRoots::transid_max()
 | 
			
		||||
{
 | 
			
		||||
	return m_transid_re.count();
 | 
			
		||||
	const auto rv = m_transid_re.count();
 | 
			
		||||
	// transid must be greater than zero, or we did something very wrong
 | 
			
		||||
	THROW_CHECK1(runtime_error, rv, rv > 0);
 | 
			
		||||
	// transid must be less than max, or we did something very wrong
 | 
			
		||||
	THROW_CHECK1(runtime_error, rv, rv < numeric_limits<uint64_t>::max());
 | 
			
		||||
	return rv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct BeesFileCrawl {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user