Skip to content

Commit

Permalink
Removed delay option.
Browse files Browse the repository at this point in the history
  • Loading branch information
adizere committed Feb 26, 2021
1 parent 859a3e6 commit fd9f9d6
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions relayer-cli/src/commands/create/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ pub struct CreateConnectionCommand {
no_short
)]
client_b: Option<ClientId>,

#[options(
help = "delay period parameter for the new connection; default: `0`.",
no_short
)]
delay: Option<u64>,
// TODO: Packet delay feature is not implemented, so we disallow specifying this option.
// https://github.com/informalsystems/ibc-rs/issues/640
// #[options(
// help = "delay period parameter for the new connection; default: `0`.",
// no_short
// )]
// delay: Option<u64>,
}

// cargo run --bin hermes -- create connection ibc-0 ibc-1
// cargo run --bin hermes -- create connection ibc-0 ibc-1 --delay 1000
// cargo run --bin hermes -- create connection ibc-0 --client-a-id 07-tendermint-0 --client-b-id 07-tendermint-0 [--delay <delay>]
// cargo run --bin hermes -- create connection ibc-0 ibc-1
// cargo run --bin hermes -- create connection ibc-0 --client-a-id 07-tendermint-0 --client-b-id 07-tendermint-0
impl Runnable for CreateConnectionCommand {
fn run(&self) {
match &self.chain_b_id {
Expand Down Expand Up @@ -90,7 +91,8 @@ impl CreateConnectionCommand {
.unwrap_or_else(exit_with_unrecoverable_error);

// Finally, execute the connection handshake.
let c = Connection::new(client_a, client_b, self.delay.unwrap_or(0));
// TODO: pass the `delay` parameter here.
let c = Connection::new(client_a, client_b, 0);
}

/// Create a connection reusing pre-existing clients on both chains.
Expand Down Expand Up @@ -157,6 +159,7 @@ impl CreateConnectionCommand {
.unwrap_or_else(exit_with_unrecoverable_error);

// All verification passed. Create the Connection object & do the handshake.
let c = Connection::new(client_a, client_b, self.delay.unwrap_or(0));
// TODO: pass the `delay` parameter here.
let c = Connection::new(client_a, client_b, 0);
}
}

0 comments on commit fd9f9d6

Please sign in to comment.