let sequence_number_to_inscription_entry =
rtx.open_table(SEQUENCE_NUMBER_TO_INSCRIPTION_ENTRY)?;
let Some(newest_sequence_number) = height_to_last_sequence_number
.get(&block_height)?
.map(|ag| ag.value())
else {
return Ok(Vec::new());
};
let oldest_sequence_number = height_to_last_sequence_number
.get(block_height.saturating_sub(1))?
.map(|ag| ag.value())
.unwrap_or(0);
(oldest_sequence_number..newest_sequence_number)
.map(|num| match sequence_number_to_inscription_entry.get(&num) {
Ok(Some(inscription_id)) => Ok(InscriptionEntry::load(inscription_id.value()).id),
Ok(None) => Err(anyhow!(
"could not find inscription for inscription number {num}"
)),
Err(err) => Err(anyhow!(err)),
})
.collect::<Result<Vec<InscriptionId>>>()
}
pub(crate) fn get_highest_paying_inscriptions_in_block(
&self,
block_height: u32,
n: usize,
) -> Result<(Vec<InscriptionId>, usize)> {
let inscription_ids = self.get_inscriptions_in_block(block_height)?;