Skip to content

Commit

Permalink
add status
Browse files Browse the repository at this point in the history
  • Loading branch information
cong-or committed Mar 27, 2023
1 parent 28243db commit 80dff20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/voting-tools-rs/Cargo.toml
Expand Up @@ -56,7 +56,6 @@ cddl = "0.9.1"
postgres = {version = "0.19.4" , features = ["with-serde_json-1"] }
cryptoxide = "0.4.4"


[dev-dependencies]
serial_test = "0.9"
assert_fs = "1.0.7"
Expand Down
4 changes: 2 additions & 2 deletions src/voting-tools-rs/src/db/queries/stake_value.rs
Expand Up @@ -30,9 +30,9 @@ impl Db {
let rows = stake_addrs.par_iter().map(|addr| {
let hex = hex::encode(&addr);

dbg!("stake key hash for query {:?}", hex.clone());
// dbg!("stake key hash for query {:?}", hex.clone());
let result = self.exec(|conn| query(hex).load(conn))?;
dbg!("result {:?}", result.clone());
// dbg!("result {:?}", result.clone());
Ok::<_, Report>((addr.clone(), result))
});

Expand Down
6 changes: 4 additions & 2 deletions src/voting-tools-rs/src/par/verify.rs
Expand Up @@ -74,8 +74,10 @@ pub fn filter_registrations(
// Here we can use a threadpool with a size == number of cores.
// We can process each row in parallel using this pool.

// We should also print out a running status of the number of registrations we have processed so far,
// otherwise long running queries look locked up.
info!(
"registrations processed {:?}",
valids.len() + invalids.len()
);

// registration tx_id
let tx_id: i64 = row.get(REG_TX_ID);
Expand Down

0 comments on commit 80dff20

Please sign in to comment.