(cherry picked from commit c2191d885d)
Co-authored-by: sakridge <sakridge@gmail.com>
			
			
This commit is contained in:
		@@ -1088,19 +1088,22 @@ impl<T: 'static + Clone + IsCached + ZeroLamport> AccountsIndex<T> {
 | 
				
			|||||||
    where
 | 
					    where
 | 
				
			||||||
        C: Contains<'a, Slot>,
 | 
					        C: Contains<'a, Slot>,
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        let mut write_account_map_entry = self.get_account_write_entry(pubkey).unwrap();
 | 
					        if let Some(mut write_account_map_entry) = self.get_account_write_entry(pubkey) {
 | 
				
			||||||
        write_account_map_entry.slot_list_mut(|slot_list| {
 | 
					            write_account_map_entry.slot_list_mut(|slot_list| {
 | 
				
			||||||
            slot_list.retain(|(slot, item)| {
 | 
					                slot_list.retain(|(slot, item)| {
 | 
				
			||||||
                let should_purge = slots_to_purge.contains(&slot);
 | 
					                    let should_purge = slots_to_purge.contains(&slot);
 | 
				
			||||||
                if should_purge {
 | 
					                    if should_purge {
 | 
				
			||||||
                    reclaims.push((*slot, item.clone()));
 | 
					                        reclaims.push((*slot, item.clone()));
 | 
				
			||||||
                    false
 | 
					                        false
 | 
				
			||||||
                } else {
 | 
					                    } else {
 | 
				
			||||||
                    true
 | 
					                        true
 | 
				
			||||||
                }
 | 
					                    }
 | 
				
			||||||
            });
 | 
					                });
 | 
				
			||||||
            slot_list.is_empty()
 | 
					                slot_list.is_empty()
 | 
				
			||||||
        })
 | 
					            })
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pub fn min_ongoing_scan_root(&self) -> Option<Slot> {
 | 
					    pub fn min_ongoing_scan_root(&self) -> Option<Slot> {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user