Skip to content

Commit

Permalink
blockstore: Remove the duplicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez committed Mar 6, 2024
1 parent 07b9ea7 commit d71f084
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use {
log::*,
rand::Rng,
rayon::{
iter::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator},
iter::{IntoParallelIterator, ParallelIterator},
ThreadPool,
},
rocksdb::{DBRawIterator, LiveFile},
Expand Down Expand Up @@ -3283,27 +3283,6 @@ impl Blockstore {
self.get_slot_entries_in_block(slot, vec![(start_index, end_index)], slot_meta)
}

fn get_any_valid_slot_entries(&self, slot: Slot, start_index: u64) -> Vec<Entry> {
let (completed_ranges, slot_meta) = self
.get_completed_ranges(slot, start_index)
.unwrap_or_default();
if completed_ranges.is_empty() {
return vec![];
}
let slot_meta = slot_meta.unwrap();

let entries: Vec<Vec<Entry>> = PAR_THREAD_POOL_ALL_CPUS.install(|| {
completed_ranges
.par_iter()
.map(|(start_index, end_index)| {
self.get_entries_in_data_block(slot, *start_index, *end_index, Some(&slot_meta))
.unwrap_or_default()
})
.collect()
});
entries.into_iter().flatten().collect()
}

/// Returns a mapping from each elements of `slots` to a list of the
/// element's children slots.
pub fn get_slots_since(&self, slots: &[Slot]) -> Result<HashMap<Slot, Vec<Slot>>> {
Expand Down

0 comments on commit d71f084

Please sign in to comment.