mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-01 02:25:24 -05:00
Add Withdrawals struct (#6267)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! ```no_run
|
||||
//! # use reth_rpc_types::engine::{PayloadAttributes as EthPayloadAttributes, PayloadId};
|
||||
//! # use reth_rpc_types::Withdrawal;
|
||||
//! # use reth_primitives::{B256, ChainSpec, Address};
|
||||
//! # use reth_primitives::{B256, ChainSpec, Address, Withdrawals};
|
||||
//! # use reth_node_api::{EngineTypes, EngineApiMessageVersion, validate_version_specific_fields, AttributesValidationError, PayloadAttributes, PayloadBuilderAttributes, PayloadOrAttributes};
|
||||
//! # use reth_payload_builder::{EthPayloadBuilderAttributes, EthBuiltPayload};
|
||||
//! # use serde::{Deserialize, Serialize};
|
||||
@@ -108,7 +108,7 @@
|
||||
//! self.0.prev_randao
|
||||
//! }
|
||||
//!
|
||||
//! fn withdrawals(&self) -> &Vec<reth_primitives::Withdrawal> {
|
||||
//! fn withdrawals(&self) -> &Withdrawals {
|
||||
//! &self.0.withdrawals
|
||||
//! }
|
||||
//! }
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::{validate_version_specific_fields, AttributesValidationError, EngineA
|
||||
use reth_primitives::{
|
||||
revm::config::revm_spec_by_timestamp_after_merge,
|
||||
revm_primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnv, SpecId},
|
||||
Address, ChainSpec, Header, SealedBlock, B256, U256,
|
||||
Address, ChainSpec, Header, SealedBlock, Withdrawals, B256, U256,
|
||||
};
|
||||
use reth_rpc_types::{
|
||||
engine::{
|
||||
@@ -72,7 +72,7 @@ pub trait PayloadBuilderAttributes: Send + Sync + std::fmt::Debug {
|
||||
fn prev_randao(&self) -> B256;
|
||||
|
||||
/// Returns the withdrawals for the running payload job.
|
||||
fn withdrawals(&self) -> &Vec<reth_primitives::Withdrawal>;
|
||||
fn withdrawals(&self) -> &Withdrawals;
|
||||
|
||||
/// Returns the configured [CfgEnv] and [BlockEnv] for the targeted payload (that has the
|
||||
/// `parent` as its parent).
|
||||
|
||||
Reference in New Issue
Block a user