diff --git a/beacon_node/http_api/src/publish_blocks.rs b/beacon_node/http_api/src/publish_blocks.rs index 754d7d91f..a769796f3 100644 --- a/beacon_node/http_api/src/publish_blocks.rs +++ b/beacon_node/http_api/src/publish_blocks.rs @@ -31,22 +31,19 @@ pub async fn publish_block( // Send the block, regardless of whether or not it is valid. The API // specification is very clear that this is the desired behaviour. - let message = todo!(""); - /* - let message = if matches!(block, SignedBeaconBlock::Eip4844(_)) { + let message = if matches!(block.as_ref(), &SignedBeaconBlock::Eip4844(_)) { if let Some(sidecar) = chain.blob_cache.pop(&block_root) { PubsubMessage::BeaconBlockAndBlobsSidecars(Arc::new(SignedBeaconBlockAndBlobsSidecar { - beacon_block: block, + beacon_block: block.clone(), blobs_sidecar: Arc::new(sidecar), })) } else { - //FIXME(sean): This should probably return a specific no - blob cached error code, beacon API coordination required - return Err(warp_utils::reject::broadcast_without_import(format!(""))); + //FIXME(sean): This should probably return a specific no-blob-cached error code, beacon API coordination required + return Err(warp_utils::reject::broadcast_without_import(format!("no blob cached for block"))); } } else { PubsubMessage::BeaconBlock(block.clone()) }; - */ crate::publish_pubsub_message(network_tx, message)?; // Determine the delay after the start of the slot, register it with metrics. diff --git a/consensus/types/Cargo.toml b/consensus/types/Cargo.toml index 36353d679..49fa49c20 100644 --- a/consensus/types/Cargo.toml +++ b/consensus/types/Cargo.toml @@ -27,7 +27,8 @@ serde_derive = "1.0.116" slog = "2.5.2" eth2_ssz = "0.4.1" eth2_ssz_derive = "0.3.1" -eth2_ssz_types = "0.2.2" +#FIXME(sean) +eth2_ssz_types = { path = "../ssz_types" } swap_or_not_shuffle = { path = "../swap_or_not_shuffle" } test_random_derive = { path = "../../common/test_random_derive" } tree_hash = "0.4.1"