Bugfix/network monitor version check (#697)

* Fixed validator-api network version check

* Removed redundant clone
This commit is contained in:
Jędrzej Stuczyński
2021-07-22 10:32:08 +01:00
committed by GitHub
parent addb721d66
commit 698345dbe9
2 changed files with 7 additions and 8 deletions
+6 -7
View File
@@ -293,13 +293,12 @@ fn minor_0_11_upgrade(
.collect();
// If the description file already exists, upgrade it
let new_description = if description_file_path.is_file() {
let description_content =
fs::read_to_string(description_file_path.clone()).map_err(|err| {
(
to_version.clone(),
format!("failed to read description file! - {:?}", err),
)
})?;
let description_content = fs::read_to_string(description_file_path).map_err(|err| {
(
to_version.clone(),
format!("failed to read description file! - {:?}", err),
)
})?;
let old_description: OldNodeDescription =
toml::from_str(&description_content).map_err(|err| {
(
@@ -16,7 +16,7 @@ pub(crate) struct TestedNetwork {
impl TestedNetwork {
pub(crate) fn new_good(good_v4_topology: NymTopology, good_v6_topology: NymTopology) -> Self {
TestedNetwork {
system_version: "0.10.0".to_string(),
system_version: env!("CARGO_PKG_VERSION").to_owned(),
good_v4_topology,
good_v6_topology,
}