pub fn status(&self, current_slot: Slot, slot_hashes: &SlotHashes) -> LookupTableStatus {
        if self.deactivation_slot == Slot::MAX {
            LookupTableStatus::Activated
        } else if self.deactivation_slot == current_slot {
            LookupTableStatus::Deactivating {
                remaining_blocks: MAX_ENTRIES.saturating_add(1),
            }
        } else if let Some(slot_hash_position) = slot_hashes.position(&self.deactivation_slot) {
            // Deactivation requires a cool-down period to give in-flight transactions
            // enough time to land and to remove indeterminism caused by transactions loading
            // addresses in the same slot when a table is closed. The cool-down period is
            // equivalent to the amount of time it takes for a slot to be removed from the
            // slot hash list.
            //
            // By using the slot hash to enforce the cool-down, there is a side effect
            // of not allowing lookup tables to be recreated at the same derived address
            // because tables must be created at an address derived from a recent slot.
            LookupTableStatus::Deactivating {
                remaining_blocks: MAX_ENTRIES.saturating_sub(slot_hash_position),
            }
        } else {
            LookupTableStatus::Deactivated
        }
    }
/// Return the current status of the lookup table
Return the current status of the lookup table
Return the current status of the lookup table
pub fn status(&self, current_slot: Slot, slot_hashes: &SlotHashes) -> LookupTableStatus {
        if self.deactivation_slot == Slot::MAX {
            LookupTableStatus::Activated
        } else if self.deactivation_slot == current_slot {
            LookupTableStatus::Deactivating {
                remaining_blocks: MAX_ENTRIES.saturating_add(1),
            }
        } else if let Some(slot_hash_position) = slot_hashes.position(&self.deactivation_slot) {
            // Deactivation requires a cool-down period to give in-flight transactions
            // enough time to land and to remove indeterminism caused by transactions loading
            // addresses in the same slot when a table is closed. The cool-down period is
            // equivalent to the amount of time it takes for a slot to be removed from the
            // slot hash list.
            //
            // By using the slot hash to enforce the cool-down, there is a side effect
            // of not allowing lookup tables to be recreated at the same derived address
            // because tables must be created at an address derived from a recent slot.
            LookupTableStatus::Deactivating {
                remaining_blocks: MAX_ENTRIES.saturating_sub(slot_hash_position),
            }
        } else {
            LookupTableStatus::Deactivated
        }
    }
pub fn status ( & self , current_slot : Slot , slot_hashes : & SlotHashes ) -> LookupTableStatus { if self . deactivation_slot == Slot :: MAX { LookupTableStatus :: Activated } else if self . deactivation_slot == current_slot { LookupTableStatus :: Deactivating { remaining_blocks : MAX_ENTRIES . saturating_add ( 1 ) , } } else if let Some ( slot_hash_position ) = slot_hashes . position ( & self . deactivation_slot ) { // Deactivation requires a cool-down period to give in-flight transactions // enough time to land and to remove indeterminism caused by transactions loading // addresses in the same slot when a table is closed. The cool-down period is // equivalent to the amount of time it takes for a slot to be removed from the // slot hash list. // // By using the slot hash to enforce the cool-down, there is a side effect // of not allowing lookup tables to be recreated at the same derived address // because tables must be created at an address derived from a recent slot. LookupTableStatus :: Deactivating { remaining_blocks : MAX_ENTRIES . saturating_sub ( slot_hash_position ) , } } else { LookupTableStatus :: Deactivated } }
Return the current status of the lookup table
Return the current status of the lookup table
&self
current_slot
Slot
slot_hashes
&SlotHashes