chore: remove block_to_payload_v1 (#14143)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Arpit Temani
2025-02-01 16:36:35 +05:30
committed by GitHub
parent 5c7df17a48
commit 209b44829e
11 changed files with 22 additions and 47 deletions

View File

@ -19,7 +19,6 @@ reth-primitives-traits.workspace = true
reth-revm = { workspace = true, features = ["witness"] }
reth-transaction-pool.workspace = true
reth-provider.workspace = true
reth-rpc-types-compat.workspace = true
reth-evm.workspace = true
reth-execution-types.workspace = true
reth-payload-builder.workspace = true

View File

@ -21,7 +21,7 @@ use reth_optimism_primitives::{OpBlock, OpPrimitives, OpTransactionSigned};
use reth_payload_builder::EthPayloadBuilderAttributes;
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_primitives::{transaction::WithEncoded, SealedBlock};
use reth_rpc_types_compat::engine::payload::block_to_payload_v1;
use std::sync::Arc;
/// Optimism Payload Builder Attributes
@ -229,7 +229,10 @@ impl BuiltPayload for &OpBuiltPayload {
// V1 engine_getPayloadV1 response
impl From<OpBuiltPayload> for ExecutionPayloadV1 {
fn from(value: OpBuiltPayload) -> Self {
block_to_payload_v1(Arc::unwrap_or_clone(value.block))
Self::from_block_unchecked(
value.block().hash(),
&Arc::unwrap_or_clone(value.block).into_block(),
)
}
}