mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: phase out block_to_payload_v3 (#14140)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -7,7 +7,8 @@ use alloy_eips::{
|
||||
use alloy_primitives::{keccak256, Address, Bytes, B256, B64, U256};
|
||||
use alloy_rlp::Encodable;
|
||||
use alloy_rpc_types_engine::{
|
||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadFieldV2, ExecutionPayloadV1, PayloadId,
|
||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadFieldV2, ExecutionPayloadV1, ExecutionPayloadV3,
|
||||
PayloadId,
|
||||
};
|
||||
use op_alloy_consensus::{encode_holocene_extra_data, EIP1559ParamError};
|
||||
/// Re-export for use in downstream arguments.
|
||||
@ -20,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, block_to_payload_v3};
|
||||
use reth_rpc_types_compat::engine::payload::block_to_payload_v1;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Optimism Payload Builder Attributes
|
||||
@ -258,7 +259,10 @@ impl From<OpBuiltPayload> for OpExecutionPayloadEnvelopeV3 {
|
||||
B256::ZERO
|
||||
};
|
||||
Self {
|
||||
execution_payload: block_to_payload_v3(Arc::unwrap_or_clone(block)),
|
||||
execution_payload: ExecutionPayloadV3::from_block_unchecked(
|
||||
block.hash(),
|
||||
&Arc::unwrap_or_clone(block).into_block(),
|
||||
),
|
||||
block_value: fees,
|
||||
// From the engine API spec:
|
||||
//
|
||||
@ -285,7 +289,10 @@ impl From<OpBuiltPayload> for OpExecutionPayloadEnvelopeV4 {
|
||||
B256::ZERO
|
||||
};
|
||||
Self {
|
||||
execution_payload: block_to_payload_v3(Arc::unwrap_or_clone(block)),
|
||||
execution_payload: ExecutionPayloadV3::from_block_unchecked(
|
||||
block.hash(),
|
||||
&Arc::unwrap_or_clone(block).into_block(),
|
||||
),
|
||||
block_value: fees,
|
||||
// From the engine API spec:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user