Skip to content

Commit 1f3d171

Browse files
author
clint
committed
refactor(parser): simplify proof_id parsing logic
1 parent 4f728eb commit 1f3d171

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ fn parse_proof_file(content: &str) -> Result<(String, Option<String>)> {
688688
/// realm_id < 1000) Returns (job_id_hex, realm_id)
689689
fn parse_proof_id(proof_id: &str) -> Result<(String, u64)> {
690690
const JOB_ID_HEX_LEN: usize = 48; // 24 bytes = 48 hex chars
691-
const REALM_ID_HEX_LEN: usize = 4; // 2 bytes = 4 hex chars
692691

693692
if proof_id.len() < JOB_ID_HEX_LEN {
694693
anyhow::bail!(
@@ -697,15 +696,6 @@ fn parse_proof_id(proof_id: &str) -> Result<(String, u64)> {
697696
proof_id.len()
698697
);
699698
}
700-
701-
if proof_id.len() != JOB_ID_HEX_LEN + REALM_ID_HEX_LEN {
702-
anyhow::bail!(
703-
"proof_id length: expected {} characters, got {}",
704-
JOB_ID_HEX_LEN + REALM_ID_HEX_LEN,
705-
proof_id.len()
706-
);
707-
}
708-
709699
// Extract job_id_hex from the beginning (48 chars)
710700
let job_id_hex = proof_id[..JOB_ID_HEX_LEN].to_string();
711701

0 commit comments

Comments
 (0)