Skip to content

Commit

Permalink
Remove index_block_inscription_numbers helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Nov 13, 2023
1 parent 19db94a commit 9869ac5
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 @@ -528,11 +528,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(), &inscription_updater.lost_sats)?;

Expand Down Expand Up @@ -653,21 +652,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 9869ac5

Please sign in to comment.