)
}
pub(crate) fn get_inscription_ids_by_sat(&self, sat: Sat) -> Result<Vec<InscriptionId>> {
let rtx = self.database.begin_read()?;
let sequence_number_to_inscription_entry =
rtx.open_table(SEQUENCE_NUMBER_TO_INSCRIPTION_ENTRY)?;
let ids = rtx
.open_multimap_table(SAT_TO_SEQUENCE_NUMBER)?
.get(&sat.n())?
.map(|result| {
result
.and_then(|sequence_number| {
let sequence_number = sequence_number.value();
sequence_number_to_inscription_entry
.get(sequence_number)
.map(|entry| InscriptionEntry::load(entry.unwrap().value()).id)
})
.map_err(|err| err.into())
})
.collect::<Result<Vec<InscriptionId>>>()?;
Ok(ids)
}
pub(crate) fn get_inscription_ids_by_sat_paginated(
&self,
sat: Sat,
page_size: u64,
page_index: u64,
) -> Result<(Vec<InscriptionId>, bool)> {
let rtx = self.database.begin_read()?;
let sequence_number_to_inscription_entry =