mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(builder): desired block gas limit (#13351)
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
//! Ethereum Node types config.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig};
|
||||
use reth_beacon_consensus::EthBeaconConsensus;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -24,7 +22,6 @@ use reth_node_builder::{
|
||||
rpc::{EngineValidatorBuilder, RpcAddOns},
|
||||
BuilderContext, Node, NodeAdapter, NodeComponentsBuilder, PayloadBuilderConfig, PayloadTypes,
|
||||
};
|
||||
use reth_node_core::version::default_extra_data_bytes;
|
||||
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
||||
use reth_primitives::{EthPrimitives, PooledTransactionsElement};
|
||||
use reth_provider::{CanonStateSubscriptions, EthStorage};
|
||||
@ -35,6 +32,7 @@ use reth_transaction_pool::{
|
||||
TransactionValidationTaskExecutor,
|
||||
};
|
||||
use reth_trie_db::MerklePatriciaTrie;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{EthEngineTypes, EthEvmConfig};
|
||||
|
||||
@ -230,24 +228,9 @@ where
|
||||
}
|
||||
|
||||
/// A basic ethereum payload service.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct EthereumPayloadBuilder {
|
||||
/// Payload builder configuration.
|
||||
config: EthereumBuilderConfig,
|
||||
}
|
||||
|
||||
impl Default for EthereumPayloadBuilder {
|
||||
fn default() -> Self {
|
||||
Self { config: EthereumBuilderConfig::new(default_extra_data_bytes()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl EthereumPayloadBuilder {
|
||||
/// Create new ethereum payload builder.
|
||||
pub const fn new(config: EthereumBuilderConfig) -> Self {
|
||||
Self { config }
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Default, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub struct EthereumPayloadBuilder;
|
||||
|
||||
impl EthereumPayloadBuilder {
|
||||
/// A helper method initializing [`PayloadBuilderService`] with the given EVM config.
|
||||
@ -270,9 +253,11 @@ impl EthereumPayloadBuilder {
|
||||
PayloadBuilderAttributes = EthPayloadBuilderAttributes,
|
||||
>,
|
||||
{
|
||||
let payload_builder =
|
||||
reth_ethereum_payload_builder::EthereumPayloadBuilder::new(evm_config, self.config);
|
||||
let conf = ctx.payload_builder_config();
|
||||
let payload_builder = reth_ethereum_payload_builder::EthereumPayloadBuilder::new(
|
||||
evm_config,
|
||||
EthereumBuilderConfig::new(conf.extradata_bytes()).with_gas_limit(conf.gas_limit()),
|
||||
);
|
||||
|
||||
let payload_job_config = BasicPayloadJobGeneratorConfig::default()
|
||||
.interval(conf.interval())
|
||||
|
||||
Reference in New Issue
Block a user