Hack to skip cleanup_dead_slots upon snapshot load
This commit is contained in:
		
				
					committed by
					
						
						Michael Vines
					
				
			
			
				
	
			
			
			
						parent
						
							1ca4913328
						
					
				
				
					commit
					5d9130a3c4
				
			@@ -447,16 +447,18 @@ pub fn bank_from_archive<P: AsRef<Path>>(
 | 
			
		||||
    let mut snapshot_version = String::new();
 | 
			
		||||
    File::open(unpacked_version_file).and_then(|mut f| f.read_to_string(&mut snapshot_version))?;
 | 
			
		||||
 | 
			
		||||
    let bank = rebuild_bank_from_snapshots(
 | 
			
		||||
    let mut bank = rebuild_bank_from_snapshots(
 | 
			
		||||
        snapshot_version.trim(),
 | 
			
		||||
        account_paths,
 | 
			
		||||
        &unpacked_snapshots_dir,
 | 
			
		||||
        unpacked_accounts_dir,
 | 
			
		||||
    )?;
 | 
			
		||||
 | 
			
		||||
    bank.work_around_dead_slots_cleaning_bug(true);
 | 
			
		||||
    if !bank.verify_snapshot_bank() {
 | 
			
		||||
        panic!("Snapshot bank for slot {} failed to verify", bank.slot());
 | 
			
		||||
    }
 | 
			
		||||
    bank.work_around_dead_slots_cleaning_bug(false);
 | 
			
		||||
    measure.stop();
 | 
			
		||||
    info!("{}", measure);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user