Skip to content

Commit

Permalink
treat id as u32
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Dec 9, 2024
1 parent 1b35abd commit 6441ec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy/stage/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:2a5c7a20b9f7cffccab773b3db007d9a9d85c39a"
image: "ghcr.io/worldcoin/iris-mpc:c712190e6a1da6b3253edd6166bf76168294c177"

environment: stage
replicaCount: 1
Expand Down
6 changes: 3 additions & 3 deletions iris-mpc-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub use s3_importer::{fetch_and_parse_chunks, last_snapshot_timestamp, ObjectSto
use sqlx::{
migrate::Migrator, postgres::PgPoolOptions, Executor, PgPool, Postgres, Row, Transaction,
};
use std::{ops::DerefMut, pin::Pin};
use std::{ops::DerefMut, pin::Pin, u32};

const APP_NAME: &str = "SMPC";
const MAX_CONNECTIONS: u32 = 100;
Expand Down Expand Up @@ -93,11 +93,11 @@ impl StoredIris {

// Parse `id` (i64)
let id_bytes = extract_slice(bytes, &mut cursor, 4)?;
let id = i64::from_be_bytes(
let id = u32::from_be_bytes(
id_bytes
.try_into()
.map_err(|_| eyre!("Failed to convert id bytes to i64"))?,
);
) as i64;

// parse codes and masks
let left_code = extract_slice(bytes, &mut cursor, 25_600)?;
Expand Down

0 comments on commit 6441ec3

Please sign in to comment.