Skip to content

Commit

Permalink
Remove Index::index_block_inscription_numbers (#2667)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Nov 13, 2023
1 parent b9cf53d commit e39031a
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/index/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,10 @@ impl<'index> Updater<'_> {
}
}

self.index_block_inscription_numbers(
&mut height_to_last_sequence_number,
&inscription_updater,
index_inscriptions,
)?;
if index_inscriptions {
height_to_last_sequence_number
.insert(&self.height, inscription_updater.next_sequence_number)?;
}

statistic_to_count.insert(
&Statistic::LostSats.key(),
Expand Down Expand Up @@ -656,21 +655,6 @@ impl<'index> Updater<'_> {
Ok(())
}

fn index_block_inscription_numbers(
&mut self,
height_to_sequence_number: &mut Table<u64, u64>,
inscription_updater: &InscriptionUpdater,
index_inscription: bool,
) -> Result {
if !index_inscription {
return Ok(());
}

height_to_sequence_number.insert(&self.height, inscription_updater.next_sequence_number)?;

Ok(())
}

fn commit(&mut self, wtx: WriteTransaction, value_cache: HashMap<OutPoint, u64>) -> Result {
log::info!(
"Committing at block height {}, {} outputs traversed, {} in map, {} cached",
Expand Down

0 comments on commit e39031a

Please sign in to comment.