Skip to content

Commit

Permalink
fix: fix RPC version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Jun 12, 2024
1 parent b91c7f3 commit 572d682
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/sozo/src/commands/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ fn is_compatible_version(provided_version: &str, expected_version: &str) -> Resu
.map_err(|e| anyhow!("Failed to parse expected version '{}': {}", expected_version, e))?;

// Specific backward compatibility rule: 0.6 is compatible with 0.7.
if (provided_ver.major == 0 && provided_ver.minor == 6)
&& (expected_ver.major == 0 && expected_ver.minor == 7)
if (provided_ver.major == 0 && provided_ver.minor == 7)
&& (expected_ver.major == 0 && expected_ver.minor == 6)
{
return Ok(true);
}
Expand Down Expand Up @@ -235,7 +235,9 @@ mod tests {

#[test]
fn test_is_compatible_version_specific_backward_compatibility() {
assert!(is_compatible_version("0.6.0", "0.7.1").unwrap());
let node_version = "0.7.1";
let katana_version = "0.6.0";
assert!(is_compatible_version(node_version, katana_version).unwrap());
}

#[test]
Expand Down

0 comments on commit 572d682

Please sign in to comment.