mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Implement reliable range sync for PeerDAS
This commit is contained in:
@@ -199,7 +199,7 @@ impl<E: EthSpec> RpcBlock<E> {
|
||||
custody_columns: Vec<CustodyDataColumn<E>>,
|
||||
expected_custody_indices: Vec<ColumnIndex>,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Self, AvailabilityCheckError> {
|
||||
) -> Result<Self, String> {
|
||||
let block_root = block_root.unwrap_or_else(|| get_block_root(&block));
|
||||
|
||||
let custody_columns_count = expected_custody_indices.len();
|
||||
@@ -209,11 +209,7 @@ impl<E: EthSpec> RpcBlock<E> {
|
||||
custody_columns,
|
||||
spec.number_of_columns as usize,
|
||||
)
|
||||
.map_err(|e| {
|
||||
AvailabilityCheckError::Unexpected(format!(
|
||||
"custody_columns len exceeds number_of_columns: {e:?}"
|
||||
))
|
||||
})?,
|
||||
.map_err(|e| format!("custody_columns len exceeds number_of_columns: {e:?}"))?,
|
||||
expected_custody_indices,
|
||||
};
|
||||
Ok(Self {
|
||||
|
||||
@@ -2418,7 +2418,8 @@ where
|
||||
columns,
|
||||
expected_custody_indices,
|
||||
&self.spec,
|
||||
)?
|
||||
)
|
||||
.map_err(BlockError::InternalError)?
|
||||
} else {
|
||||
RpcBlock::new_without_blobs(Some(block_root), block, sampling_column_count)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user