mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Merge remote-tracking branch 'sigp/unstable' into payload-attestation-committee-cache
# Conflicts: # beacon_node/beacon_chain/src/payload_attestation_verification/tests.rs
This commit is contained in:
@@ -79,7 +79,7 @@ impl ForkChoiceTest {
|
||||
/// Get a value from the `ForkChoice` instantiation.
|
||||
fn get<T, U>(&self, func: T) -> U
|
||||
where
|
||||
T: Fn(&BeaconForkChoiceStore<E, MemoryStore<E>, MemoryStore<E>>) -> U,
|
||||
T: Fn(&BeaconForkChoiceStore<E, MemoryStore, MemoryStore>) -> U,
|
||||
{
|
||||
func(
|
||||
self.harness
|
||||
|
||||
@@ -250,19 +250,16 @@ impl<E: EthSpec> DataColumnSidecarFulu<E> {
|
||||
}
|
||||
|
||||
/// Convert this full data column into a verifiable partial data column.
|
||||
pub fn to_partial(&self) -> PartialDataColumn<E> {
|
||||
/// Note: This is not expected to ever fail.
|
||||
pub fn to_partial(&self) -> Result<PartialDataColumn<E>, PartialDataColumnSidecarError> {
|
||||
let cell_count = self.column.len();
|
||||
let mut bitmap =
|
||||
CellBitmap::<E>::with_capacity(cell_count).expect("our column has the same bound");
|
||||
for idx in 0..cell_count {
|
||||
bitmap
|
||||
.set(idx, true)
|
||||
.expect("The correct size is initialized right above");
|
||||
}
|
||||
let mut bitmap = CellBitmap::<E>::with_capacity(cell_count)
|
||||
.map_err(|_| PartialDataColumnSidecarError::UnexpectedBounds)?;
|
||||
bitmap.not_inplace();
|
||||
|
||||
let block_root = self.block_root();
|
||||
|
||||
PartialDataColumn {
|
||||
Ok(PartialDataColumn {
|
||||
block_root,
|
||||
index: self.index,
|
||||
sidecar: PartialDataColumnSidecar {
|
||||
@@ -276,7 +273,7 @@ impl<E: EthSpec> DataColumnSidecarFulu<E> {
|
||||
})
|
||||
.into(),
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user