mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
pending payload cache: drop unused vec ctor arg
This commit is contained in:
@@ -15,10 +15,6 @@ impl<E: EthSpec> Default for PendingColumn<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<E: EthSpec> PendingColumn<E> {
|
impl<E: EthSpec> PendingColumn<E> {
|
||||||
pub fn new_with_capacity(_blobs: usize) -> Self {
|
|
||||||
Self { cells: Vec::new() }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn insert(&mut self, index: usize, cell: &Cell<E>, proof: &KzgProof) {
|
pub fn insert(&mut self, index: usize, cell: &Cell<E>, proof: &KzgProof) {
|
||||||
if let Some(existing_cell) = self.cells.get_mut(index)
|
if let Some(existing_cell) = self.cells.get_mut(index)
|
||||||
&& existing_cell.is_none()
|
&& existing_cell.is_none()
|
||||||
|
|||||||
@@ -81,11 +81,10 @@ impl<E: EthSpec> PendingComponents<E> {
|
|||||||
) -> Result<(), AvailabilityCheckError> {
|
) -> Result<(), AvailabilityCheckError> {
|
||||||
for data_column in kzg_verified_data_columns {
|
for data_column in kzg_verified_data_columns {
|
||||||
let data_column = data_column.as_data_column();
|
let data_column = data_column.as_data_column();
|
||||||
let num_blobs_expected = self.num_blobs_expected();
|
|
||||||
let col = self
|
let col = self
|
||||||
.verified_data_columns
|
.verified_data_columns
|
||||||
.entry(*data_column.index())
|
.entry(*data_column.index())
|
||||||
.or_insert_with(|| PendingColumn::new_with_capacity(num_blobs_expected));
|
.or_default();
|
||||||
for (cell_idx, (cell, proof)) in data_column
|
for (cell_idx, (cell, proof)) in data_column
|
||||||
.column()
|
.column()
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user