pub fn lookup(
        &self,
        current_slot: Slot,
        indexes: &[u8],
        slot_hashes: &SlotHashes,
    ) -> Result<Vec<Pubkey>, AddressLookupError> {
        let active_addresses_len = self.get_active_addresses_len(current_slot, slot_hashes)?;
        let active_addresses = &self.addresses[0..active_addresses_len];
        indexes
            .iter()
            .map(|idx| active_addresses.get(*idx as usize).cloned())
            .collect::<Option<_>>()
            .ok_or(AddressLookupError::InvalidLookupIndex)
    }
/// Lookup addresses for provided table indexes. Since lookups are performed on
/// tables which are not read-locked, this implementation needs to be careful
/// about resolving addresses consistently.
Lookup addresses for provided table indexes. Since lookups are performed on
tables which are not read-locked, this implementation needs to be careful
about resolving addresses consistently.
Lookup addresses for provided table indexes . Since lookups are performed on tables which are not read - locked this implementation needs to be careful about resolving addresses consistently .
pub fn lookup(
        &self,
        current_slot: Slot,
        indexes: &[u8],
        slot_hashes: &SlotHashes,
    ) -> Result<Vec<Pubkey>, AddressLookupError> {
        let active_addresses_len = self.get_active_addresses_len(current_slot, slot_hashes)?;
        let active_addresses = &self.addresses[0..active_addresses_len];
        indexes
            .iter()
            .map(|idx| active_addresses.get(*idx as usize).cloned())
            .collect::<Option<_>>()
            .ok_or(AddressLookupError::InvalidLookupIndex)
    }
pub fn lookup ( & self , current_slot : Slot , indexes : & [ u8 ] , slot_hashes : & SlotHashes , ) -> Result < Vec < Pubkey > , AddressLookupError > { let active_addresses_len = self . get_active_addresses_len ( current_slot , slot_hashes ) ? ; let active_addresses = & self . addresses [ 0 .. active_addresses_len ] ; indexes . iter ( ) . map ( | idx | active_addresses . get ( * idx as usize ) . cloned ( ) ) . collect :: < Option < _ > > ( ) . ok_or ( AddressLookupError :: InvalidLookupIndex ) }
Lookup addresses for provided table indexes.
Lookup addresses for provided table indexes .
&self
current_slot
Slot
indexes
&[u8]
slot_hashes
&SlotHashes