.iter()? .rev() .take(n) .flat_map(|result| { result.map(|(number, entry)| (number.value(), InscriptionEntry::load(entry.value()).id)) }) .collect(), ) } pub(crate) fn get_inscription_entry( &self, inscription_id: InscriptionId, ) -> Result> { let rtx = self.database.begin_read()?; let Some(sequence_number) = rtx .open_table(INSCRIPTION_ID_TO_SEQUENCE_NUMBER)? .get(&inscription_id.store())? .map(|guard| guard.value()) else { return Ok(None); }; let entry = rtx .open_table(SEQUENCE_NUMBER_TO_INSCRIPTION_ENTRY)? .get(sequence_number)? .map(|value| InscriptionEntry::load(value.value())); Ok(entry) } #[cfg(test)] fn assert_inscription_location( &self, inscription_id: InscriptionId, satpoint: SatPoint, sat: Option, ) { let rtx = self.database.begin_read().unwrap(); let satpoint_to_sequence_number = rtx .open_multimap_table(SATPOINT_TO_SEQUENCE_NUMBER)