reth_ethereum_cli/
lib.rs

1//! Reth CLI implementation.
2
3#![doc(
4    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6    issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
7)]
8#![cfg_attr(not(test), warn(unused_crate_dependencies))]
9#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
10
11/// Chain specification parser.
12pub mod chainspec;
13
14#[cfg(test)]
15mod test {
16    use clap::Parser;
17    use reth_chainspec::DEV;
18    use reth_cli_commands::NodeCommand;
19
20    #[test]
21    #[ignore = "reth cmd will print op-reth output if optimism feature enabled"]
22    fn parse_dev() {
23        let cmd: NodeCommand = NodeCommand::parse_from(["reth", "--dev"]);
24        let chain = DEV.clone();
25        assert_eq!(cmd.chain.chain, chain.chain);
26        assert_eq!(cmd.chain.genesis_hash, chain.genesis_hash);
27        assert_eq!(
28            cmd.chain.paris_block_and_final_difficulty,
29            chain.paris_block_and_final_difficulty
30        );
31        assert_eq!(cmd.chain.hardforks, chain.hardforks);
32
33        assert!(cmd.rpc.http);
34        assert!(cmd.network.discovery.disable_discovery);
35
36        assert!(cmd.dev.dev);
37    }
38}