fix blob validation for empty blobs

This commit is contained in:
realbigsean
2022-12-23 12:47:38 -05:00
parent 5db0a88d4f
commit 5e11edc612
13 changed files with 119 additions and 81 deletions

View File

@@ -43,9 +43,7 @@ pub async fn publish_block<T: BeaconChainTypes>(
network_tx,
PubsubMessage::BeaconBlockAndBlobsSidecars(block_and_blobs.clone()),
)?;
BlockWrapper::BlockAndBlob {
block_sidecar_pair: block_and_blobs,
}
BlockWrapper::BlockAndBlob(block_and_blobs)
} 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!(
@@ -54,7 +52,7 @@ pub async fn publish_block<T: BeaconChainTypes>(
}
} else {
crate::publish_pubsub_message(network_tx, PubsubMessage::BeaconBlock(block.clone()))?;
BlockWrapper::Block { block }
BlockWrapper::Block(block)
};
// Determine the delay after the start of the slot, register it with metrics.