mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
block wrapper refactor initial commit
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::{
|
||||
use parking_lot::RwLock;
|
||||
use proto_array::Block as ProtoBlock;
|
||||
use std::sync::Arc;
|
||||
use store::signed_block_and_blobs::BlockWrapper;
|
||||
use store::signed_block_and_blobs::AvailableBlock;
|
||||
use types::*;
|
||||
|
||||
pub struct CacheItem<E: EthSpec> {
|
||||
@@ -51,7 +51,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
pub fn add_head_block(
|
||||
&self,
|
||||
beacon_block_root: Hash256,
|
||||
block: BlockWrapper<E>,
|
||||
block: AvailableBlock<E>,
|
||||
proto_block: ProtoBlock,
|
||||
state: &BeaconState<E>,
|
||||
spec: &ChainSpec,
|
||||
@@ -69,7 +69,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
},
|
||||
};
|
||||
|
||||
let (block, blobs) = block.deconstruct(Some(beacon_block_root));
|
||||
let (block, blobs) = block.deconstruct();
|
||||
let item = CacheItem {
|
||||
epoch,
|
||||
committee_lengths,
|
||||
@@ -77,7 +77,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
source,
|
||||
target,
|
||||
block,
|
||||
blobs: blobs.map_err(|_| Error::MissingBlobs)?,
|
||||
blobs,
|
||||
proto_block,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user