mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use Requests instead of Vec<Bytes> (#11895)
This commit is contained in:
@ -31,6 +31,7 @@ reth-node-types.workspace = true
|
||||
reth-chainspec = { workspace = true, optional = true }
|
||||
|
||||
# ethereum
|
||||
alloy-eips.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types-engine.workspace = true
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ use crate::{
|
||||
engine::message::OnForkChoiceUpdated, BeaconConsensusEngineEvent, BeaconEngineMessage,
|
||||
BeaconForkChoiceUpdateError, BeaconOnNewPayloadError,
|
||||
};
|
||||
use alloy_primitives::Bytes;
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_rpc_types_engine::{
|
||||
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
|
||||
};
|
||||
@ -48,7 +48,7 @@ where
|
||||
&self,
|
||||
payload: ExecutionPayload,
|
||||
cancun_fields: Option<CancunPayloadFields>,
|
||||
execution_requests: Option<Vec<Bytes>>,
|
||||
execution_requests: Option<Requests>,
|
||||
) -> Result<PayloadStatus, BeaconOnNewPayloadError> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
// HACK(onbjerg): We should have a pectra payload fields struct, this is just a temporary
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use crate::engine::{error::BeaconOnNewPayloadError, forkchoice::ForkchoiceStatus};
|
||||
use alloy_primitives::Bytes;
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_rpc_types_engine::{
|
||||
CancunPayloadFields, ExecutionPayload, ForkChoiceUpdateResult, ForkchoiceState,
|
||||
ForkchoiceUpdateError, ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum,
|
||||
@ -150,7 +150,7 @@ pub enum BeaconEngineMessage<Engine: EngineTypes> {
|
||||
// HACK(onbjerg): We should have a pectra payload fields struct, this is just a temporary
|
||||
// workaround.
|
||||
/// The pectra EIP-7685 execution requests.
|
||||
execution_requests: Option<Vec<Bytes>>,
|
||||
execution_requests: Option<Requests>,
|
||||
/// The sender for returning payload status result.
|
||||
tx: oneshot::Sender<Result<PayloadStatus, BeaconOnNewPayloadError>>,
|
||||
},
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use alloy_primitives::{BlockNumber, Bytes, B256};
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use alloy_rpc_types_engine::{
|
||||
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
||||
PayloadValidationError,
|
||||
@ -1087,7 +1088,7 @@ where
|
||||
cancun_fields: Option<CancunPayloadFields>,
|
||||
// HACK(onbjerg): We should have a pectra payload fields struct, this is just a temporary
|
||||
// workaround.
|
||||
execution_requests: Option<Vec<Bytes>>,
|
||||
execution_requests: Option<Requests>,
|
||||
) -> Result<Either<PayloadStatus, SealedBlock>, BeaconOnNewPayloadError> {
|
||||
self.metrics.new_payload_messages.increment(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user