Use efficient payload reconstruction for HTTP API (#4102)

## Proposed Changes

Builds on #4028 to use the new payload bodies methods in the HTTP API as well.

## Caveats

The payloads by range method only works for the finalized chain, so it can't be used in the execution engine integration tests because we try to reconstruct unfinalized payloads there.
This commit is contained in:
Michael Sproul
2023-04-18 02:47:35 +00:00
parent dd124b2d68
commit 1d92e3f77c
3 changed files with 54 additions and 6 deletions

View File

@@ -626,9 +626,10 @@ async fn check_payload_reconstruction<E: GenericExecutionEngine>(
ee: &ExecutionPair<E, MainnetEthSpec>,
payload: &ExecutionPayload<MainnetEthSpec>,
) {
// check via legacy eth_getBlockByHash
let reconstructed = ee
.execution_layer
.get_payload_by_block_hash(payload.block_hash(), payload.fork_name())
.get_payload_by_hash_legacy(payload.block_hash(), payload.fork_name())
.await
.unwrap()
.unwrap();