mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
De-duplicate signing/connection params. (#861)
Co-authored-by: Hernando Castano <hernando@hcastano.com>
This commit is contained in:
committed by
Bastian Köcher
parent
1928e2b870
commit
1dbba1b95b
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::cli::{CliChain, PrometheusParams, SourceConnectionParams, TargetConnectionParams, TargetSigningParams};
|
||||
use crate::cli::{PrometheusParams, SourceConnectionParams, TargetConnectionParams, TargetSigningParams};
|
||||
use structopt::{clap::arg_enum, StructOpt};
|
||||
|
||||
/// Start headers relayer process.
|
||||
@@ -74,10 +74,9 @@ impl RelayHeaders {
|
||||
/// Run the command.
|
||||
pub async fn run(self) -> anyhow::Result<()> {
|
||||
select_bridge!(self.bridge, {
|
||||
let source_client = crate::rialto_millau::source_chain_client::<Source>(self.source).await?;
|
||||
let target_client = crate::rialto_millau::target_chain_client::<Target>(self.target).await?;
|
||||
let target_sign =
|
||||
Target::target_signing_params(self.target_sign).map_err(|e| anyhow::format_err!("{}", e))?;
|
||||
let source_client = self.source.into_client::<Source>().await?;
|
||||
let target_client = self.target.into_client::<Target>().await?;
|
||||
let target_sign = self.target_sign.into_keypair::<Target>()?;
|
||||
|
||||
crate::finality_pipeline::run(
|
||||
Finality::new(target_client.clone(), target_sign),
|
||||
|
||||
Reference in New Issue
Block a user