Runs the CLI.
(self, chain: ConsensusChainArgs)
| 55 | impl Bootnode { |
| 56 | /// Runs the CLI. |
| 57 | pub fn run(self, chain: ConsensusChainArgs) -> eyre::Result<()> { |
| 58 | base_cli_utils::init_tracing!( |
| 59 | LogConfig::from(self.logging.clone()), |
| 60 | ["libp2p_gossipsub=error"] |
| 61 | )?; |
| 62 | |
| 63 | let cfg = self.l2_config.load(&chain.l2_chain_id).map_err(|e| eyre::eyre!(e))?; |
| 64 | |
| 65 | base_cli_utils::MetricsConfig::from(self.metrics.clone()).init_with(|| { |
| 66 | base_cli_utils::register_version_metrics!(); |
| 67 | CliMetrics::init_rollup_config(&cfg); |
| 68 | CliMetrics::init_bootnode_p2p(&self.p2p); |
| 69 | })?; |
| 70 | |
| 71 | RuntimeManager::new().run_until_ctrl_c(self.exec(cfg)) |
| 72 | } |
| 73 | |
| 74 | /// Runs the discovery-only bootnode. |
| 75 | pub async fn exec(self, cfg: RollupConfig) -> eyre::Result<()> { |
nothing calls this directly
no test coverage detected