remove unnecessary consts (#1586)

This commit is contained in:
Svyatoslav Nikolsky
2022-09-30 15:42:55 +03:00
committed by Bastian Köcher
parent 0f79d1e86e
commit 5ff36549f1
27 changed files with 29 additions and 293 deletions
@@ -90,7 +90,7 @@ impl CliEncodeMessage for Millau {
}
impl CliChain for Millau {
const RUNTIME_VERSION: RuntimeVersion = millau_runtime::VERSION;
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(millau_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
@@ -73,7 +73,7 @@ impl CliEncodeMessage for Rialto {
}
impl CliChain for Rialto {
const RUNTIME_VERSION: RuntimeVersion = rialto_runtime::VERSION;
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
@@ -74,7 +74,7 @@ impl CliEncodeMessage for RialtoParachain {
}
impl CliChain for RialtoParachain {
const RUNTIME_VERSION: RuntimeVersion = rialto_parachain_runtime::VERSION;
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_parachain_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
@@ -21,7 +21,7 @@ use relay_westend_client::{Westend, Westmint};
use sp_version::RuntimeVersion;
impl CliChain for Westend {
const RUNTIME_VERSION: RuntimeVersion = bp_westend::VERSION;
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
@@ -35,7 +35,7 @@ impl CliChain for Westend {
}
impl CliChain for Westmint {
const RUNTIME_VERSION: RuntimeVersion = bp_westend::VERSION;
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
type MessagePayload = Vec<u8>;
@@ -115,7 +115,7 @@ macro_rules! declare_chain_connection_params_cli_schema {
) -> anyhow::Result<relay_substrate_client::Client<Chain>> {
let chain_runtime_version = self
.[<$chain_prefix _runtime_version>]
.into_runtime_version(Some(Chain::RUNTIME_VERSION))?;
.into_runtime_version(Chain::RUNTIME_VERSION)?;
Ok(relay_substrate_client::Client::new(relay_substrate_client::ConnectionParams {
host: self.[<$chain_prefix _host>],
port: self.[<$chain_prefix _port>],
+3 -1
View File
@@ -163,7 +163,9 @@ impl Balance {
/// Used to abstract away CLI commands.
pub trait CliChain: relay_substrate_client::Chain {
/// Current version of the chain runtime, known to relay.
const RUNTIME_VERSION: sp_version::RuntimeVersion;
///
/// can be `None` if relay is not going to submit transactions to that chain.
const RUNTIME_VERSION: Option<sp_version::RuntimeVersion>;
/// Crypto KeyPair type used to send messages.
///