impl hash correctly for the blob wrapper
This commit is contained in:
parent
d09523802b
commit
1dc0759f57
@ -2944,7 +2944,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
ops.push(StoreOp::PutBlock(block_root, signed_block.clone()));
|
||||
ops.push(StoreOp::PutState(block.state_root(), &state));
|
||||
|
||||
if let Some(blobs) = blobs {
|
||||
if let Some(blobs) = blobs? {
|
||||
//FIXME(sean) using this for debugging for now
|
||||
info!(self.log, "Writing blobs to store"; "block_root" => ?block_root);
|
||||
ops.push(StoreOp::PutBlobs(block_root, blobs));
|
||||
|
@ -77,7 +77,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
source,
|
||||
target,
|
||||
block,
|
||||
blobs,
|
||||
blobs: blobs?,
|
||||
proto_block,
|
||||
};
|
||||
|
||||
|
@ -93,15 +93,17 @@ impl<T: EthSpec> BlockWrapper<T> {
|
||||
self.block().parent_root()
|
||||
}
|
||||
|
||||
pub fn deconstruct(self) -> (Arc<SignedBeaconBlock<T>>, Option<Arc<BlobsSidecar<T>>>) {
|
||||
pub fn deconstruct(self) -> (Arc<SignedBeaconBlock<T>>, Result<Option<Arc<BlobsSidecar<T>>>, BlobReconstructionError>) {
|
||||
match self {
|
||||
BlockWrapper::Block(block) => (block, None),
|
||||
BlockWrapper::Block(block) => (block, block
|
||||
.reconstruct_empty_blobs(block_root)
|
||||
.map(|blob_opt| blob_opt.map(Arc::new))),
|
||||
BlockWrapper::BlockAndBlob(block_sidecar_pair) => {
|
||||
let SignedBeaconBlockAndBlobsSidecar {
|
||||
beacon_block,
|
||||
blobs_sidecar,
|
||||
} = block_sidecar_pair;
|
||||
(beacon_block, Some(blobs_sidecar))
|
||||
(beacon_block, Ok(Some(blobs_sidecar)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user