Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
trim whitespace on genesis_waypoint.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Jun 16, 2022
1 parent acba74d commit 8160dce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/management/genesis/src/ol_node_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ fn make_genesis_file(
Some(path) => {
// TODO: insert waypoint
let gen_wp_path = path.parent().unwrap().join("genesis_waypoint.txt");
let wp: Waypoint =
fs::read_to_string(&gen_wp_path)?
.parse().map_err(|_| anyhow::anyhow!("cannot parse genesis_waypoint.txt"))?;
let wp_string = fs::read_to_string(&gen_wp_path)?;
let wp: Waypoint = wp_string.trim().parse()
.map_err(|_| anyhow::anyhow!("cannot parse genesis_waypoint.txt"))?;
Ok((path.to_owned(), wp))
}
None => {
Expand Down Expand Up @@ -496,4 +496,4 @@ fn encode_validator_seed_for_vfn_discovery(
let mut seeds = PeerSet::default();
seeds.insert(validator_account, val_peer_data);
Ok(seeds)
}
}

0 comments on commit 8160dce

Please sign in to comment.