mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 15:48:13 -05:00
chore: Expose payload_id (#16931)
Co-authored-by: Solar Mithril <solarmithril@pm.me>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
extern crate alloc;
|
||||
|
||||
mod payload;
|
||||
pub use payload::{BlobSidecars, EthBuiltPayload, EthPayloadBuilderAttributes};
|
||||
pub use payload::{payload_id, BlobSidecars, EthBuiltPayload, EthPayloadBuilderAttributes};
|
||||
|
||||
mod error;
|
||||
pub use error::*;
|
||||
|
||||
@@ -404,7 +404,7 @@ impl PayloadBuilderAttributes for EthPayloadBuilderAttributes {
|
||||
/// Generates the payload id for the configured payload from the [`PayloadAttributes`].
|
||||
///
|
||||
/// Returns an 8-byte identifier by hashing the payload components with sha256 hash.
|
||||
pub(crate) fn payload_id(parent: &B256, attributes: &PayloadAttributes) -> PayloadId {
|
||||
pub fn payload_id(parent: &B256, attributes: &PayloadAttributes) -> PayloadId {
|
||||
use sha2::Digest;
|
||||
let mut hasher = sha2::Sha256::new();
|
||||
hasher.update(parent.as_slice());
|
||||
|
||||
@@ -16,7 +16,9 @@ pub use builder::OpPayloadBuilder;
|
||||
pub mod error;
|
||||
pub mod payload;
|
||||
use op_alloy_rpc_types_engine::OpExecutionData;
|
||||
pub use payload::{OpBuiltPayload, OpPayloadAttributes, OpPayloadBuilderAttributes};
|
||||
pub use payload::{
|
||||
payload_id_optimism, OpBuiltPayload, OpPayloadAttributes, OpPayloadBuilderAttributes,
|
||||
};
|
||||
mod traits;
|
||||
use reth_optimism_primitives::OpPrimitives;
|
||||
use reth_payload_primitives::{BuiltPayload, PayloadTypes};
|
||||
|
||||
@@ -327,7 +327,7 @@ where
|
||||
/// Generates the payload id for the configured payload from the [`OpPayloadAttributes`].
|
||||
///
|
||||
/// Returns an 8-byte identifier by hashing the payload components with sha256 hash.
|
||||
pub(crate) fn payload_id_optimism(
|
||||
pub fn payload_id_optimism(
|
||||
parent: &B256,
|
||||
attributes: &OpPayloadAttributes,
|
||||
payload_version: u8,
|
||||
|
||||
Reference in New Issue
Block a user