Skip to content

Commit 4442798

Browse files
authored
fix: Fixed a flaky test (block hash can be 43 or 44 characters long when base58-encoded) (#529)
1 parent 70c188d commit 4442798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn normalize_output(output: &str) -> String {
5858
let normalized = block_regex.replace_all(&normalized, "At block #[BLOCK_NUM]");
5959

6060
// Replace block hashes (e.g., "(Gqo3Sym99tdtKm9Ha2aVFUvPPcqNVX8qfQ3dvpUk9B51)" -> "([BLOCK_HASH])")
61-
let hash_regex = Regex::new(r"\([A-Za-z0-9]{44}\)").unwrap();
61+
let hash_regex = Regex::new(r"\([A-Za-z0-9]{43,44}\)").unwrap();
6262
let normalized = hash_regex.replace_all(&normalized, "([BLOCK_HASH])");
6363

6464
normalized.to_string()

0 commit comments

Comments
 (0)