automerge
This commit is contained in:
@ -1473,7 +1473,7 @@ impl Blockstore {
|
|||||||
completed_ranges
|
completed_ranges
|
||||||
.par_iter()
|
.par_iter()
|
||||||
.map(|(start_index, end_index)| {
|
.map(|(start_index, end_index)| {
|
||||||
self.get_entries_in_data_block(slot, *start_index, *end_index)
|
self.get_entries_in_data_block(slot, *start_index, *end_index, &slot_meta)
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
})
|
})
|
||||||
@ -1514,6 +1514,7 @@ impl Blockstore {
|
|||||||
slot: Slot,
|
slot: Slot,
|
||||||
start_index: u32,
|
start_index: u32,
|
||||||
end_index: u32,
|
end_index: u32,
|
||||||
|
slot_meta: &SlotMeta,
|
||||||
) -> Result<Vec<Entry>> {
|
) -> Result<Vec<Entry>> {
|
||||||
let data_shred_cf = self.db.column::<cf::ShredData>();
|
let data_shred_cf = self.db.column::<cf::ShredData>();
|
||||||
|
|
||||||
@ -1523,10 +1524,22 @@ impl Blockstore {
|
|||||||
data_shred_cf
|
data_shred_cf
|
||||||
.get_bytes((slot, u64::from(i)))
|
.get_bytes((slot, u64::from(i)))
|
||||||
.and_then(|serialized_shred| {
|
.and_then(|serialized_shred| {
|
||||||
Shred::new_from_serialized_shred(
|
Shred::new_from_serialized_shred(serialized_shred.unwrap_or_else(|| {
|
||||||
serialized_shred
|
panic!(
|
||||||
.expect("Shred must exist if shred index was included in a range"),
|
"Shred with
|
||||||
|
slot: {},
|
||||||
|
index: {},
|
||||||
|
consumed: {},
|
||||||
|
completed_indexes: {:?}
|
||||||
|
must exist if shred index was included in a range: {} {}",
|
||||||
|
slot,
|
||||||
|
i,
|
||||||
|
slot_meta.consumed,
|
||||||
|
slot_meta.completed_data_indexes,
|
||||||
|
start_index,
|
||||||
|
end_index
|
||||||
)
|
)
|
||||||
|
}))
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
BlockstoreError::InvalidShredData(Box::new(bincode::ErrorKind::Custom(
|
BlockstoreError::InvalidShredData(Box::new(bincode::ErrorKind::Custom(
|
||||||
format!(
|
format!(
|
||||||
|
Reference in New Issue
Block a user