mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
renamed OptimismNode to OpNode (#12338)
This commit is contained in:
@ -18,7 +18,7 @@ pub mod engine;
|
||||
pub use engine::OpEngineTypes;
|
||||
|
||||
pub mod node;
|
||||
pub use node::OptimismNode;
|
||||
pub use node::OpNode;
|
||||
|
||||
pub mod txpool;
|
||||
|
||||
|
||||
@ -51,12 +51,12 @@ impl NodePrimitives for OpPrimitives {
|
||||
/// Type configuration for a regular Optimism node.
|
||||
#[derive(Debug, Default, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub struct OptimismNode {
|
||||
pub struct OpNode {
|
||||
/// Additional Optimism args
|
||||
pub args: RollupArgs,
|
||||
}
|
||||
|
||||
impl OptimismNode {
|
||||
impl OpNode {
|
||||
/// Creates a new instance of the Optimism node type.
|
||||
pub const fn new(args: RollupArgs) -> Self {
|
||||
Self { args }
|
||||
@ -92,7 +92,7 @@ impl OptimismNode {
|
||||
}
|
||||
}
|
||||
|
||||
impl<N> Node<N> for OptimismNode
|
||||
impl<N> Node<N> for OpNode
|
||||
where
|
||||
N: FullNodeTypes<Types: NodeTypesWithEngine<Engine = OpEngineTypes, ChainSpec = OpChainSpec>>,
|
||||
{
|
||||
@ -119,13 +119,13 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl NodeTypes for OptimismNode {
|
||||
impl NodeTypes for OpNode {
|
||||
type Primitives = OpPrimitives;
|
||||
type ChainSpec = OpChainSpec;
|
||||
type StateCommitment = MerklePatriciaTrie;
|
||||
}
|
||||
|
||||
impl NodeTypesWithEngine for OptimismNode {
|
||||
impl NodeTypesWithEngine for OpNode {
|
||||
type Engine = OpEngineTypes;
|
||||
}
|
||||
|
||||
|
||||
@ -6,14 +6,14 @@ use reth_e2e_test_utils::{
|
||||
};
|
||||
use reth_optimism_chainspec::OpChainSpecBuilder;
|
||||
use reth_optimism_node::{
|
||||
node::OptimismAddOns, OpBuiltPayload, OpPayloadBuilderAttributes, OptimismNode,
|
||||
node::OptimismAddOns, OpBuiltPayload, OpNode as OtherOpNode, OpPayloadBuilderAttributes,
|
||||
};
|
||||
use reth_payload_builder::EthPayloadBuilderAttributes;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
/// Optimism Node Helper type
|
||||
pub(crate) type OpNode = NodeHelperType<OptimismNode, OptimismAddOns<Adapter<OptimismNode>>>;
|
||||
pub(crate) type OpNode = NodeHelperType<OtherOpNode, OptimismAddOns<Adapter<OtherOpNode>>>;
|
||||
|
||||
pub(crate) async fn setup(num_nodes: usize) -> eyre::Result<(Vec<OpNode>, TaskManager, Wallet)> {
|
||||
let genesis: Genesis = serde_json::from_str(include_str!("../assets/genesis.json")).unwrap();
|
||||
|
||||
@ -4,7 +4,7 @@ use reth_db::test_utils::create_test_rw_db;
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_builder::{NodeBuilder, NodeConfig};
|
||||
use reth_optimism_chainspec::BASE_MAINNET;
|
||||
use reth_optimism_node::{node::OptimismAddOns, OptimismNode};
|
||||
use reth_optimism_node::{node::OptimismAddOns, OpNode};
|
||||
|
||||
#[test]
|
||||
fn test_basic_setup() {
|
||||
@ -13,8 +13,8 @@ fn test_basic_setup() {
|
||||
let db = create_test_rw_db();
|
||||
let _builder = NodeBuilder::new(config)
|
||||
.with_database(db)
|
||||
.with_types::<OptimismNode>()
|
||||
.with_components(OptimismNode::components(Default::default()))
|
||||
.with_types::<OpNode>()
|
||||
.with_components(OpNode::components(Default::default()))
|
||||
.with_add_ons(OptimismAddOns::new(None))
|
||||
.on_component_initialized(move |ctx| {
|
||||
let _provider = ctx.provider();
|
||||
|
||||
Reference in New Issue
Block a user