Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoss17 committed Oct 15, 2024
1 parent 50a7c02 commit dff8d3e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 58 deletions.
8 changes: 0 additions & 8 deletions tools/test-framework/src/chain/cli/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ pub fn initialize(chain_id: &str, command_path: &str, home_path: &str) -> Result
chain_id,
],
)?;
simple_exec(
chain_id,
command_path,
&[
"version",
"--long",
],
)?;

Ok(())
}
Expand Down
21 changes: 0 additions & 21 deletions tools/test-framework/src/chain/cli/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,6 @@ pub fn submit_consumer_chain_proposal(
)?;
}

thread::sleep(core::time::Duration::from_secs(3));

let query_txhash_output = simple_exec(
chain_id,
command_path,
&[
"--home",
home_path,
"--node",
rpc_listen_address,
"query",
"tx",
"--type=hash",
txhash,
"--output",
"json",
],
)?;

tracing::warn!("{}", query_txhash_output.stdout);

Ok(())
}

Expand Down
29 changes: 1 addition & 28 deletions tools/test-framework/src/chain/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ pub fn set_block_sync(config: &mut Value, value: bool) -> Result<(), Error> {
config
.as_table_mut()
.ok_or_else(|| eyre!("expect object"))?
.insert(
"block_sync".to_string(),
value.into(),
);
.insert("block_sync".to_string(), value.into());

Ok(())
}
Expand Down Expand Up @@ -226,30 +223,6 @@ pub fn add_allow_message_interchainaccounts(
Ok(())
}

pub fn add_pub_key_types(genesis: &mut serde_json::Value, pub_key_type: &str) -> Result<(), Error> {
let pub_key_types = if let Some(consensus) = genesis.get_mut("consensus") {
consensus.get_mut("params")
.and_then(|params| params.get_mut("validator"))
.and_then(|validator| validator.get_mut("pub_key_types"))
.and_then(|pub_key_types| pub_key_types.as_array_mut())
.ok_or_else(|| {
eyre!("failed to retrieve pub_key_types as a vector, in the genesis file under `consensus`")
})?
} else {
genesis.get_mut("consensus_params")
.and_then(|consensus_params| consensus_params.get_mut("validator"))
.and_then(|validator| validator.get_mut("pub_key_types"))
.and_then(|pub_key_types| pub_key_types.as_array_mut())
.ok_or_else(|| {
eyre!("failed to retrieve pub_key_types as a vector, in the genesis file under `consensus_params`")
})?
};

pub_key_types.push(serde_json::Value::String(pub_key_type.to_string()));

Ok(())
}

pub fn add_allow_message_interchainquery(
genesis: &mut serde_json::Value,
message: &str,
Expand Down
1 change: 0 additions & 1 deletion tools/test-framework/src/chain/ext/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ impl ChainBootstrapMethodsExt for ChainDriver {
consumer_chain_id: &str,
fees: &str,
) -> Result<(), Error> {

let raw_proposal = r#"
{
"chain_id": "{consumer_chain_id}",
Expand Down

0 comments on commit dff8d3e

Please sign in to comment.