Implement get validator block endpoint for EIP-4844

This commit is contained in:
Jimmy Chen
2023-02-15 16:44:13 +11:00
parent ae3e5f73d6
commit 6ec0ce6070
13 changed files with 201 additions and 34 deletions

View File

@@ -11,6 +11,7 @@ mod attester_duties;
mod block_id;
mod block_packing_efficiency;
mod block_rewards;
mod build_block_contents;
mod database;
mod metrics;
mod proposer_duties;
@@ -2421,7 +2422,10 @@ pub fn serve<T: BeaconChainTypes>(
.fork_name(&chain.spec)
.map_err(inconsistent_fork_rejection)?;
fork_versioned_response(endpoint_version, fork_name, block)
let block_contents =
build_block_contents::build_block_contents(fork_name, chain, block);
fork_versioned_response(endpoint_version, fork_name, block_contents?)
.map(|response| warp::reply::json(&response))
},
);