mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Fix the can-author issue by defaulting to Kusama when no chainspec given. (#728)
* Fix can_author by defaulting correctly. * Comments * Better logging * Bump Substrate * Minor updates to readme.
This commit is contained in:
@@ -76,11 +76,14 @@ pub fn run<E: IntoExit>(exit: E, version: cli::VersionInfo) -> error::Result<()>
|
||||
"parity-polkadot",
|
||||
std::env::args(),
|
||||
);
|
||||
|
||||
// TODO: Use `IsKusama` trait. #727
|
||||
if cmd
|
||||
.shared_params()
|
||||
.and_then(|p| p.chain.as_ref())
|
||||
.and_then(|c| ChainSpec::from(c))
|
||||
.map_or(false, |c| c.is_kusama())
|
||||
.map_or(true, |p| ChainSpec::from(&p)
|
||||
.map_or(false, |c| c.is_kusama())
|
||||
)
|
||||
{
|
||||
execute_cmd_with_runtime::<
|
||||
service::kusama_runtime::RuntimeApi,
|
||||
@@ -120,7 +123,7 @@ where
|
||||
info!("{}", version.name);
|
||||
info!(" version {}", config.full_version());
|
||||
info!(" by {}, 2017-2019", version.author);
|
||||
info!("Chain specification: {}", config.chain_spec.name());
|
||||
info!("Chain specification: {} (native: {})", config.chain_spec.name(), D::native_version().runtime_version);
|
||||
if config.is_kusama() {
|
||||
info!("----------------------------");
|
||||
info!("This chain is not in any way");
|
||||
|
||||
Reference in New Issue
Block a user