mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Validate & Store Blobs During Backfill (#4307)
* Verify and Store Blobs During Backfill * Improve logs * Eliminated Clone * Fix Inital Vector Capacity * Addressed Sean's Comments
This commit is contained in:
@@ -651,6 +651,15 @@ impl<E: EthSpec> AsBlock<E> for BlockWrapper<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> BlockWrapper<E> {
|
||||
pub fn n_blobs(&self) -> usize {
|
||||
match self {
|
||||
BlockWrapper::Block(_) => 0,
|
||||
BlockWrapper::BlockAndBlobs(_, blobs) => blobs.len(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> From<Arc<SignedBeaconBlock<E>>> for BlockWrapper<E> {
|
||||
fn from(value: Arc<SignedBeaconBlock<E>>) -> Self {
|
||||
Self::Block(value)
|
||||
|
||||
Reference in New Issue
Block a user