Skip to content

Commit

Permalink
Update Create vp client (#474)
Browse files Browse the repository at this point in the history
* use dst chain config for create vp client and remove SubCommand CreateVpClient

* Update client.rs

---------

Co-authored-by: Yuanchao Sun <[email protected]>
  • Loading branch information
DaviRain-Su and en authored Dec 28, 2023
1 parent eea78d0 commit 3f8a7e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 118 deletions.
4 changes: 0 additions & 4 deletions crates/relayer-cli/src/commands/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ use crate::commands::tx::client::TxCreateClientCmd;

mod channel;
mod connection;
mod vp_client;

/// `create` subcommands
#[derive(Command, Debug, Parser, Runnable)]
pub enum CreateCmds {
/// Create a new IBC client
Client(TxCreateClientCmd),

/// Create a vp IBC client
VpClient(vp_client::TxCreateVpClientCmd),

/// Create a new connection between two chains
Connection(CreateConnectionCommand),

Expand Down
111 changes: 0 additions & 111 deletions crates/relayer-cli/src/commands/create/vp_client.rs

This file was deleted.

7 changes: 4 additions & 3 deletions crates/relayer-cli/src/commands/tx/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,15 @@ fn run_create_client(
fn run_only_init_vp(
config: &Config,
src_chain_id: &ChainId,
_dst_chain_id: &ChainId,
dst_chain_id: &ChainId,
clock_drift: Option<humantime::Duration>,
trusting_period: Option<humantime::Duration>,
trust_threshold: Option<TrustThreshold>,
) {
// this config use dst chain config to init vp
let chain_config = config
.find_chain(src_chain_id)
.expect("not found src chain Config");
.find_chain(dst_chain_id)
.expect("not found dst chain Config");
let src_chain = match spawn_chain_runtime(&config, src_chain_id) {
Ok(handle) => handle,
Err(e) => Output::error(e).exit(),
Expand Down

0 comments on commit 3f8a7e6

Please sign in to comment.