referrerpolicy=no-referrer-when-downgrade

polkadot_omni_node/
main.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Cumulus.
3// SPDX-License-Identifier: Apache-2.0
4
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// 	http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17//! White labeled polkadot omni-node.
18//!
19//! For documentation, see [`polkadot_omni_node_lib`].
20
21#![warn(missing_docs)]
22#![warn(unused_extern_crates)]
23
24// Force the linker to keep the polkadot_jemalloc_shim crate (and its #[global_allocator]).
25#[cfg(target_os = "linux")]
26extern crate polkadot_jemalloc_shim;
27
28use polkadot_omni_node_lib::{
29	chain_spec::DiskChainSpecLoader, extra_subcommand::NoExtraSubcommand, run_with_custom_cli,
30	runtime::DefaultRuntimeResolver, CliConfig as CliConfigT, RunConfig, NODE_VERSION,
31};
32
33struct CliConfig;
34
35impl CliConfigT for CliConfig {
36	fn impl_version() -> String {
37		let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH");
38		format!("{}-{commit_hash}", NODE_VERSION)
39	}
40
41	fn author() -> String {
42		env!("CARGO_PKG_AUTHORS").into()
43	}
44
45	fn support_url() -> String {
46		"https://github.com/paritytech/polkadot-sdk/issues/new".into()
47	}
48
49	fn copyright_start_year() -> u16 {
50		2017
51	}
52}
53
54fn main() -> color_eyre::eyre::Result<()> {
55	color_eyre::install()?;
56	let config = RunConfig::new(Box::new(DefaultRuntimeResolver), Box::new(DiskChainSpecLoader));
57	Ok(run_with_custom_cli::<CliConfig, NoExtraSubcommand>(config)?)
58}