Implement publish block and blobs endpoint (WIP)

This commit is contained in:
Jimmy Chen
2023-03-14 17:03:45 +11:00
parent 9ba390f7c5
commit a8978a5f69
8 changed files with 79 additions and 39 deletions

View File

@@ -60,7 +60,7 @@ use types::{
ProposerPreparationData, ProposerSlashing, RelativeEpoch, SignedAggregateAndProof,
SignedBeaconBlock, SignedBlindedBeaconBlock, SignedBlsToExecutionChange,
SignedContributionAndProof, SignedValidatorRegistrationData, SignedVoluntaryExit, Slot,
SyncCommitteeMessage, SyncContributionData,
SyncCommitteeMessage, SyncContributionData, SignedBlockContents,
};
use version::{
add_consensus_version_header, execution_optimistic_fork_versioned_response,
@@ -1120,11 +1120,11 @@ pub fn serve<T: BeaconChainTypes>(
.and(network_tx_filter.clone())
.and(log_filter.clone())
.and_then(
|block: Arc<SignedBeaconBlock<T::EthSpec>>,
|block_contents: SignedBlockContents<T::EthSpec>,
chain: Arc<BeaconChain<T>>,
network_tx: UnboundedSender<NetworkMessage<T::EthSpec>>,
log: Logger| async move {
publish_blocks::publish_block(None, block, chain, &network_tx, log)
publish_blocks::publish_block(None, block_contents, chain, &network_tx, log)
.await
.map(|()| warp::reply())
},