renamed OptimismBeaconConsensus to OpBeaconConsensus (#12271)

This commit is contained in:
Steven
2024-11-02 03:22:58 -06:00
committed by GitHub
parent 9593f4d08d
commit dbdf60ba11
2 changed files with 6 additions and 6 deletions

View File

@ -34,19 +34,19 @@ pub use validation::validate_block_post_execution;
///
/// Provides basic checks as outlined in the execution specs.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct OptimismBeaconConsensus {
pub struct OpBeaconConsensus {
/// Configuration
chain_spec: Arc<OpChainSpec>,
}
impl OptimismBeaconConsensus {
/// Create a new instance of [`OptimismBeaconConsensus`]
impl OpBeaconConsensus {
/// Create a new instance of [`OpBeaconConsensus`]
pub const fn new(chain_spec: Arc<OpChainSpec>) -> Self {
Self { chain_spec }
}
}
impl Consensus for OptimismBeaconConsensus {
impl Consensus for OpBeaconConsensus {
fn validate_header(&self, header: &SealedHeader) -> Result<(), ConsensusError> {
validate_header_gas(header)?;
validate_header_base_fee(header, &self.chain_spec)

View File

@ -19,7 +19,7 @@ use reth_node_builder::{
BuilderContext, Node, NodeAdapter, NodeComponentsBuilder, PayloadBuilderConfig,
};
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_consensus::OptimismBeaconConsensus;
use reth_optimism_consensus::OpBeaconConsensus;
use reth_optimism_evm::{OpExecutionStrategyFactory, OptimismEvmConfig};
use reth_optimism_rpc::OpEthApi;
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
@ -454,7 +454,7 @@ where
if ctx.is_dev() {
Ok(Arc::new(reth_auto_seal_consensus::AutoSealConsensus::new(ctx.chain_spec())))
} else {
Ok(Arc::new(OptimismBeaconConsensus::new(ctx.chain_spec())))
Ok(Arc::new(OpBeaconConsensus::new(ctx.chain_spec())))
}
}
}