mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Bump to latest Substrate (#898)
* Flag to force kusama runtime * Chainspecs for kusama * Polkadot config for westend Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * network/src/legacy/gossip: Wrap GossipEngine in Arc Mutex & lock it on use `GossipEngine` in itself has no need to be Send and Sync, given that it does not rely on separately spawned background tasks anymore. `RegisteredMessageValidator` needs to be `Send` and `Sync` due to the inherited trait bounds from implementing `GossipService`. In addition `RegisteredMessageValidator` derives `Clone`. Thereby `GossipEngine` needs to be wrapped in an `Arc` and `Mutex` to keep the status quo. * Needed fixes. * Fixes * Fixed build * Fixed build w benchmarking CLI * Fixed building tests * Added --dev shortcut Co-authored-by: arkpar <arkady.paronyan@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
+18
-11
@@ -29,13 +29,18 @@ pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
|
||||
|
||||
let mut config = service::Configuration::from_version(&version);
|
||||
config.impl_name = "parity-polkadot";
|
||||
let force_kusama = opt.run.force_kusama;
|
||||
|
||||
match opt.subcommand {
|
||||
None => {
|
||||
opt.run.init(&version)?;
|
||||
opt.run.update_config(&mut config, load_spec, &version)?;
|
||||
opt.run.base.init(&version)?;
|
||||
opt.run.base.update_config(
|
||||
&mut config,
|
||||
|id| load_spec(id, force_kusama),
|
||||
&version
|
||||
)?;
|
||||
|
||||
let is_kusama = config.chain_spec.as_ref().map_or(false, |s| s.is_kusama());
|
||||
let is_kusama = config.expect_chain_spec().is_kusama();
|
||||
|
||||
info!("{}", version.name);
|
||||
info!(" version {}", config.full_version());
|
||||
@@ -69,9 +74,13 @@ pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
|
||||
},
|
||||
Some(Subcommand::Base(cmd)) => {
|
||||
cmd.init(&version)?;
|
||||
cmd.update_config(&mut config, load_spec, &version)?;
|
||||
cmd.update_config(
|
||||
&mut config,
|
||||
|id| load_spec(id, force_kusama),
|
||||
&version
|
||||
)?;
|
||||
|
||||
let is_kusama = config.chain_spec.as_ref().map_or(false, |s| s.is_kusama());
|
||||
let is_kusama = config.expect_chain_spec().is_kusama();
|
||||
|
||||
if is_kusama {
|
||||
cmd.run(config, service::new_chain_ops::<
|
||||
@@ -100,14 +109,12 @@ pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
|
||||
},
|
||||
Some(Subcommand::Benchmark(cmd)) => {
|
||||
cmd.init(&version)?;
|
||||
cmd.update_config(&mut config, load_spec, &version)?;
|
||||
|
||||
let is_kusama = config.chain_spec.as_ref().map_or(false, |s| s.is_kusama());
|
||||
|
||||
cmd.update_config(&mut config, |id| load_spec(id, force_kusama), &version)?;
|
||||
let is_kusama = config.expect_chain_spec().is_kusama();
|
||||
if is_kusama {
|
||||
cmd.run::<_, _, service::kusama_runtime::Block, service::KusamaExecutor>(config)
|
||||
cmd.run::<service::kusama_runtime::Block, service::KusamaExecutor>(config)
|
||||
} else {
|
||||
cmd.run::<_, _, service::polkadot_runtime::Block, service::PolkadotExecutor>(config)
|
||||
cmd.run::<service::polkadot_runtime::Block, service::PolkadotExecutor>(config)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user