removed extra *_RUNTIME_VERSION consts from relay code (#1330)

This commit is contained in:
Svyatoslav Nikolsky
2022-02-25 11:34:57 +03:00
committed by Bastian Köcher
parent e29b590785
commit 60f82cf459
11 changed files with 19 additions and 145 deletions
@@ -92,24 +92,18 @@ macro_rules! select_bridge {
RelayChain::Millau => {
type Target = relay_millau_client::Millau;
type TargetSign = relay_millau_client::Millau;
const TARGET_RUNTIME_VERSION: Option<sp_version::RuntimeVersion> =
Some(millau_runtime::VERSION);
$generic
},
RelayChain::Kusama => {
type Target = relay_kusama_client::Kusama;
type TargetSign = relay_kusama_client::Kusama;
const TARGET_RUNTIME_VERSION: Option<sp_version::RuntimeVersion> =
Some(bp_kusama::VERSION);
$generic
},
RelayChain::Polkadot => {
type Target = relay_polkadot_client::Polkadot;
type TargetSign = relay_polkadot_client::Polkadot;
const TARGET_RUNTIME_VERSION: Option<sp_version::RuntimeVersion> =
Some(bp_polkadot::VERSION);
$generic
},
@@ -122,7 +116,7 @@ impl ResubmitTransactions {
pub async fn run(self) -> anyhow::Result<()> {
select_bridge!(self.chain, {
let relay_loop_name = format!("ResubmitTransactions{}", Target::NAME);
let client = self.target.to_client::<Target>(TARGET_RUNTIME_VERSION).await?;
let client = self.target.to_client::<Target>().await?;
let transaction_params = TransactionParams {
signer: self.target_sign.to_keypair::<Target>()?,
mortality: self.target_sign.target_transactions_mortality,