Skip to content

Commit

Permalink
Centralized/Proof: Using wrapping add
Browse files Browse the repository at this point in the history
  • Loading branch information
rrtoledo committed Feb 13, 2025
1 parent 6e878a7 commit 02bf6fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/centralized_telescope/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ fn check_proof(proof_lock: Arc<Mutex<bool>>) -> bool {

fn update_step_lock(step_lock: Arc<Mutex<u64>>, to_add: u64) -> () {
let mut step_guard = step_lock.lock().unwrap();
*step_guard += to_add;
*step_guard = (*step_guard).wrapping_add(to_add);
drop(step_guard);
}

Expand Down

0 comments on commit 02bf6fb

Please sign in to comment.