fn purge_special_columns_exact(
        &self,
        batch: &mut WriteBatch,
        from_slot: Slot,
        to_slot: Slot, // Exclusive
    ) -> Result<()> {
        let mut index0 = self.transaction_status_index_cf.get(0)?.unwrap_or_default();
        let mut index1 = self.transaction_status_index_cf.get(1)?.unwrap_or_default();
        for slot in from_slot..to_slot {
            let slot_entries = self.get_any_valid_slot_entries(slot, 0);
            for transaction in slot_entries
                .iter()
                .cloned()
                .flat_map(|entry| entry.transactions)
            {
                if let Some(&signature) = transaction.signatures.get(0) {
                    batch.delete::<cf::TransactionStatus>((0, signature, slot))?;
                    batch.delete::<cf::TransactionStatus>((1, signature, slot))?;
                    for pubkey in transaction.message.account_keys {
                        batch.delete::<cf::AddressSignatures>((0, pubkey, slot, signature))?;
                        batch.delete::<cf::AddressSignatures>((1, pubkey, slot, signature))?;
                    }
                }
            }
        }
        if index0.max_slot >= from_slot && index0.max_slot <= to_slot {
            index0.max_slot = from_slot.saturating_sub(1);
            batch.put::<cf::TransactionStatusIndex>(0, &index0)?;
        }
        if index1.max_slot >= from_slot && index1.max_slot <= to_slot {
            index1.max_slot = from_slot.saturating_sub(1);
            batch.put::<cf::TransactionStatusIndex>(1, &index1)?;
        }
        Ok(())
    }
/// Purges special columns (using a non-Slot primary-index) exactly, by deserializing each slot
/// being purged and iterating through all transactions to determine the keys of individual
/// records. **This method is very slow.**
Purges special columns (using a non-Slot primary-index) exactly, by deserializing each slot
being purged and iterating through all transactions to determine the keys of individual
records. **This method is very slow.
Purges special columns ( using a non - Slot primary - index ) exactly by deserializing each slot being purged and iterating through all transactions to determine the keys of individual records . ** This method is very slow .
fn purge_special_columns_exact(
        &self,
        batch: &mut WriteBatch,
        from_slot: Slot,
        to_slot: Slot, // Exclusive
    ) -> Result<()> {
        let mut index0 = self.transaction_status_index_cf.get(0)?.unwrap_or_default();
        let mut index1 = self.transaction_status_index_cf.get(1)?.unwrap_or_default();
        for slot in from_slot..to_slot {
            let slot_entries = self.get_any_valid_slot_entries(slot, 0);
            for transaction in slot_entries
                .iter()
                .cloned()
                .flat_map(|entry| entry.transactions)
            {
                if let Some(&signature) = transaction.signatures.get(0) {
                    batch.delete::<cf::TransactionStatus>((0, signature, slot))?;
                    batch.delete::<cf::TransactionStatus>((1, signature, slot))?;
                    for pubkey in transaction.message.account_keys {
                        batch.delete::<cf::AddressSignatures>((0, pubkey, slot, signature))?;
                        batch.delete::<cf::AddressSignatures>((1, pubkey, slot, signature))?;
                    }
                }
            }
        }
        if index0.max_slot >= from_slot && index0.max_slot <= to_slot {
            index0.max_slot = from_slot.saturating_sub(1);
            batch.put::<cf::TransactionStatusIndex>(0, &index0)?;
        }
        if index1.max_slot >= from_slot && index1.max_slot <= to_slot {
            index1.max_slot = from_slot.saturating_sub(1);
            batch.put::<cf::TransactionStatusIndex>(1, &index1)?;
        }
        Ok(())
    }
fn purge_special_columns_exact ( & self , batch : & mut WriteBatch , from_slot : Slot , to_slot : Slot , // Exclusive ) -> Result < ( ) > { let mut index0 = self . transaction_status_index_cf . get ( 0 ) ? . unwrap_or_default ( ) ; let mut index1 = self . transaction_status_index_cf . get ( 1 ) ? . unwrap_or_default ( ) ; for slot in from_slot .. to_slot { let slot_entries = self . get_any_valid_slot_entries ( slot , 0 ) ; for transaction in slot_entries . iter ( ) . cloned ( ) . flat_map ( | entry | entry . transactions ) { if let Some ( & signature ) = transaction . signatures . get ( 0 ) { batch . delete :: < cf :: TransactionStatus > ( ( 0 , signature , slot ) ) ? ; batch . delete :: < cf :: TransactionStatus > ( ( 1 , signature , slot ) ) ? ; for pubkey in transaction . message . account_keys { batch . delete :: < cf :: AddressSignatures > ( ( 0 , pubkey , slot , signature ) ) ? ; batch . delete :: < cf :: AddressSignatures > ( ( 1 , pubkey , slot , signature ) ) ? ; } } } } if index0 . max_slot >= from_slot && index0 . max_slot <= to_slot { index0 . max_slot = from_slot . saturating_sub ( 1 ) ; batch . put :: < cf :: TransactionStatusIndex > ( 0 , & index0 ) ? ; } if index1 . max_slot >= from_slot && index1 . max_slot <= to_slot { index1 . max_slot = from_slot . saturating_sub ( 1 ) ; batch . put :: < cf :: TransactionStatusIndex > ( 1 , & index1 ) ? ; } Ok ( ( ) ) }
Purges special columns (using a non-Slot primary-index) exactly, by deserializing each slot
being purged and iterating through all transactions to determine the keys of individual
records.
Purges special columns ( using a non - Slot primary - index ) exactly by deserializing each slot being purged and iterating through all transactions to determine the keys of individual records .
&self
batch
&mut WriteBatch
from_slot
Slot
to_slot
Slot