define_table! { RUNE_ID_TO_RUNE_ENTRY, RuneIdValue, RuneEntryValue } define_table! { RUNE_TO_RUNE_ID, u128, RuneIdValue } define_table! { SAT_TO_SATPOINT, u64, &SatPointValue } define_table! { SEQUENCE_NUMBER_TO_INSCRIPTION_ENTRY, u32, InscriptionEntryValue } define_table! { SEQUENCE_NUMBER_TO_RUNE, u32, u128 } define_table! { SEQUENCE_NUMBER_TO_SATPOINT, u32, &SatPointValue } define_table! { STATISTIC_TO_COUNT, u64, u64 } define_table! { TRANSACTION_ID_TO_RUNE, &TxidValue, u128 } define_table! { WRITE_TRANSACTION_STARTING_BLOCK_COUNT_TO_TIMESTAMP, u32, u128 } #[derive(Debug, PartialEq)] pub enum List { Spent, Unspent(Vec<(u64, u64)>), } #[derive(Copy, Clone)] pub(crate) enum Statistic { Schema = 0, BlessedInscriptions, Commits, CursedInscriptions, IndexRunes, IndexSats, LostSats, OutputsTraversed, Runes, SatRanges, UnboundInscriptions, } impl Statistic { fn key(self) -> u64 { self.into() } } impl From for u64 { fn from(statistic: Statistic) -> Self { statistic as u64