Skip to content

Commit

Permalink
Correct subtraction which could underflow
Browse files Browse the repository at this point in the history
I have no idea how this didn't prior trip.
  • Loading branch information
kayabaNerve committed Nov 26, 2023
1 parent 84a0c67 commit 2826e1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions processor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,11 @@ async fn run<N: Network, D: Db, Co: Coordinator>(mut raw_db: D, network: N, mut
// KeyGen specifically may take a notable amount of processing time
// While that shouldn't be an issue in practice, as after processing an attempt it'll handle
// the other messages in the queue, it may be beneficial to parallelize these
// They could likely be parallelized by type (KeyGen, Sign, Substrate) without issue
// They could potentially be parallelized by type (KeyGen, Sign, Substrate) without issue
msg = coordinator.recv() => {
assert_eq!(msg.id, (last_coordinator_msg.unwrap_or(msg.id - 1) + 1));
if let Some(last_coordinator_msg) = last_coordinator_msg {
assert_eq!(msg.id, last_coordinator_msg + 1);
}
last_coordinator_msg = Some(msg.id);


Expand Down

0 comments on commit 2826e1c

Please sign in to comment.