Skip to content

Commit

Permalink
Prefix fix for delegating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkilpatr committed May 18, 2021
1 parent 103f5b1 commit 9d7e08a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchestrator/test_runner/src/happy_path.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::get_chain_id;
use crate::get_fee;
use crate::utils::*;
use crate::ADDRESS_PREFIX;
use crate::CHAIN_BINARY;
use crate::MINER_ADDRESS;
use crate::MINER_PRIVATE_KEY;
Expand Down Expand Up @@ -196,7 +197,9 @@ pub async fn test_valset_update(web30: &Web3, keys: &[ValidatorKeys], gravity_ad
let validator_to_change = rng.gen_range(0..keys.len());
let delegate_address = &keys[validator_to_change]
.validator_key
.to_address("cosmosvaloper")
// this is not guaranteed to be correct, the chain may set the valoper prefix in a
// different way, but I haven't yet seen one that does not match this pattern
.to_address(&format!("{}valoper", *ADDRESS_PREFIX))
.unwrap()
.to_string();
let amount = &format!("{}stake", STARTING_STAKE_PER_VALIDATOR / 4);
Expand Down

0 comments on commit 9d7e08a

Please sign in to comment.