Describe the feature
Add a doc test to show how to build the node with node builder SDK with OpProofsExEx and rpc overrides. This doc test makes sense in the reth-optimism-exex lib.rs, assuming it's no issue with cyclical deps in dev dependencies (possibly an issue when publishing crate, but can move the doc test to another crate if needed in that case when upstreaming). See how check_launch is used here:
|
#[test] |
|
fn test_basic_setup() { |
|
// parse CLI -> config |
|
let config = NodeConfig::new(BASE_MAINNET.clone()); |
|
let db = create_test_rw_db(); |
|
let args = RollupArgs::default(); |
|
let op_node = OpNode::new(args); |
|
let _builder = NodeBuilder::new(config) |
|
.with_database(db) |
|
.with_types_and_provider::<OpNode, BlockchainProvider<NodeTypesWithDBAdapter<OpNode, _>>>() |
|
.with_components(op_node.components()) |
|
.with_add_ons(op_node.add_ons()) |
|
.on_component_initialized(move |ctx| { |
|
let _provider = ctx.provider(); |
|
Ok(()) |
|
}) |
|
.on_node_started(|_full_node| Ok(())) |
|
.on_rpc_started(|_ctx, handles| { |
|
let _client = handles.rpc.http_client(); |
|
Ok(()) |
|
}) |
|
.extend_rpc_modules(|ctx| { |
|
let _ = ctx.config(); |
|
let _ = ctx.node().provider(); |
|
|
|
Ok(()) |
|
}) |
|
.check_launch(); |
|
} |
Additional context
No response
Describe the feature
Add a doc test to show how to build the node with node builder SDK with
OpProofsExExand rpc overrides. This doc test makes sense in thereth-optimism-exexlib.rs, assuming it's no issue with cyclical deps in dev dependencies (possibly an issue when publishing crate, but can move the doc test to another crate if needed in that case when upstreaming). See howcheck_launchis used here:op-reth/crates/optimism/node/tests/it/builder.rs
Lines 31 to 59 in d5895df
Additional context
No response