Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix parallel node
  • Loading branch information
mclyk committed Nov 24, 2022
commit cd8719d4a997b1423b54a90e492a527692a244c7
106 changes: 53 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion node/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git'
frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' }
try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', optional = true }

clap = { version = '3.1', features = ['derive'] }
clap = { version = '4.0.9', features = ['derive'] }
serde = { version = '1.0.136', features = ['derive'] }
serde_json = '1.0.79'
tracing-core = '0.1.30'
Expand Down Expand Up @@ -96,6 +96,7 @@ cumulus-relay-chain-interface = { git = 'https://github.com/paritytech
cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' }
cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' }
cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' }
cumulus-relay-chain-minimal-node = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' }

polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', features = ['kusama-native'] }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' }
Expand Down
8 changes: 4 additions & 4 deletions node/parallel/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use clap::Parser;
use sc_cli::{KeySubcommand, SignCmd, VanityCmd, VerifyCmd};

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
#[derive(Debug, Parser)]
pub enum Subcommand {
/// Key management CLI utilities
#[clap(subcommand)]
#[command(subcommand)]
Key(KeySubcommand),

Sign(SignCmd),
Expand Down Expand Up @@ -64,7 +64,7 @@ pub enum Subcommand {
Revert(sc_cli::RevertCmd),

/// The custom benchmark subcommmand benchmarking runtime pallets.
#[clap(subcommand)]
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
}

Expand All @@ -75,7 +75,7 @@ pub enum Subcommand {
subcommand_negates_reqs = true
)]
pub struct Cli {
#[clap(subcommand)]
#[command(subcommand)]
pub subcommand: Option<Subcommand>,

#[clap(flatten)]
Expand Down
36 changes: 18 additions & 18 deletions node/parallel/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,63 +301,63 @@ impl sc_client_api::BlockBackend<Block> for Client {
impl sc_client_api::StorageProvider<Block, crate::service::FullBackend> for Client {
fn storage(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
key: &StorageKey,
) -> sp_blockchain::Result<Option<StorageData>> {
with_client! {
self,
client,
{
client.storage(id, key)
client.storage(hash, key)
}
}
}

fn storage_keys(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
key_prefix: &StorageKey,
) -> sp_blockchain::Result<Vec<StorageKey>> {
with_client! {
self,
client,
{
client.storage_keys(id, key_prefix)
client.storage_keys(hash, key_prefix)
}
}
}

fn storage_hash(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
key: &StorageKey,
) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> {
with_client! {
self,
client,
{
client.storage_hash(id, key)
client.storage_hash(hash, key)
}
}
}

fn storage_pairs(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
key_prefix: &StorageKey,
) -> sp_blockchain::Result<Vec<(StorageKey, StorageData)>> {
with_client! {
self,
client,
{
client.storage_pairs(id, key_prefix)
client.storage_pairs(hash, key_prefix)
}
}
}

fn storage_keys_iter<'a>(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
prefix: Option<&'a StorageKey>,
start_key: Option<&StorageKey>,
) -> sp_blockchain::Result<
Expand All @@ -371,44 +371,44 @@ impl sc_client_api::StorageProvider<Block, crate::service::FullBackend> for Clie
self,
client,
{
client.storage_keys_iter(id, prefix, start_key)
client.storage_keys_iter(hash, prefix, start_key)
}
}
}

fn child_storage(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
child_info: &ChildInfo,
key: &StorageKey,
) -> sp_blockchain::Result<Option<StorageData>> {
with_client! {
self,
client,
{
client.child_storage(id, child_info, key)
client.child_storage(hash, child_info, key)
}
}
}

fn child_storage_keys(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
child_info: &ChildInfo,
key_prefix: &StorageKey,
) -> sp_blockchain::Result<Vec<StorageKey>> {
with_client! {
self,
client,
{
client.child_storage_keys(id, child_info, key_prefix)
client.child_storage_keys(hash, child_info, key_prefix)
}
}
}

fn child_storage_keys_iter<'a>(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
child_info: ChildInfo,
prefix: Option<&'a StorageKey>,
start_key: Option<&StorageKey>,
Expand All @@ -423,22 +423,22 @@ impl sc_client_api::StorageProvider<Block, crate::service::FullBackend> for Clie
self,
client,
{
client.child_storage_keys_iter(id, child_info, prefix, start_key)
client.child_storage_keys_iter(hash, child_info, prefix, start_key)
}
}
}

fn child_storage_hash(
&self,
id: &BlockId,
hash: &<Block as BlockT>::Hash,
child_info: &ChildInfo,
key: &StorageKey,
) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> {
with_client! {
self,
client,
{
client.child_storage_hash(id, child_info, key)
client.child_storage_hash(hash, child_info, key)
}
}
}
Expand Down
Loading