Revert "renames, remove , wrap BlockWrapper enum to make descontruction private"

This reverts commit 5b3b34a9d7.
This commit is contained in:
realbigsean
2022-12-28 10:30:36 -05:00
parent 5b3b34a9d7
commit 1931a442dc
19 changed files with 268 additions and 231 deletions

View File

@@ -1699,7 +1699,7 @@ impl<T: BeaconChainTypes> BeaconProcessor<T> {
message_id,
peer_id,
peer_client,
block.into(),
BlockWrapper::Block(block),
work_reprocessing_tx,
duplicate_cache,
seen_timestamp,
@@ -1721,7 +1721,7 @@ impl<T: BeaconChainTypes> BeaconProcessor<T> {
message_id,
peer_id,
peer_client,
block_sidecar_pair.into(),
BlockWrapper::BlockAndBlob(block_sidecar_pair),
work_reprocessing_tx,
duplicate_cache,
seen_timestamp,

View File

@@ -230,10 +230,10 @@ impl<T: BeaconChainTypes> Worker<T> {
Ok((Some(block), Some(blobs))) => {
self.send_response(
peer_id,
Response::BlobsByRoot(Some(SignedBeaconBlockAndBlobsSidecar {
Response::BlobsByRoot(Some(Arc::new(SignedBeaconBlockAndBlobsSidecar {
beacon_block: block,
blobs_sidecar: blobs,
})),
}))),
request_id,
);
send_block_count += 1;

View File

@@ -188,7 +188,14 @@ impl<T: BeaconChainTypes> Worker<T> {
let end_slot = downloaded_blocks.last().map(|b| b.slot().as_u64());
let sent_blocks = downloaded_blocks.len();
let unwrapped = downloaded_blocks.into_iter().map(|_| todo!()).collect();
let unwrapped = downloaded_blocks
.into_iter()
.map(|block| match block {
BlockWrapper::Block(block) => block,
//FIXME(sean) handle blobs in backfill
BlockWrapper::BlockAndBlob(_) => todo!(),
})
.collect();
match self.process_backfill_blocks(unwrapped) {
(_, Ok(_)) => {