Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
aeyakovenko committed Feb 11, 2022
1 parent 932c46c commit 52f0f5b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions perf/src/sigverify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,34 +509,37 @@ pub fn shrink_batches(batches: &mut Vec<PacketBatch>) -> usize {
let mut ii = 0;
let mut j = 1;
let mut jj = 0;
let mut last = 0;
while j < batches.len() {
while jj < batches[j].packets.len() {
if batches[j].packets[jj].meta.discard() {
jj += 1;
jj = jj.saturating_add(1);
continue;
}
last = j;
let mut done = false;
while i < j && !done {
while ii < batches[i].packets.len() {
if batches[i].packets[ii].meta.discard() {
batches[i].packets[ii] = batches[j].packets[jj].clone();
batches[j].packets[jj].meta.set_discard(true);
last = i;
done = true;
break;
}
ii += 1;
}
if ii >= batches[i].packets.len() {
ii = 0;
i += 1;
i = i.saturating_add(1);
}
}
jj += 1;
jj = jj.saturating_add(1);
}
jj = 0;
j += 1;
j = j.saturating_add(1);
}
i + 1
last + 1
}

pub fn ed25519_verify_cpu(batches: &mut [PacketBatch], reject_non_vote: bool, packet_count: usize) {
Expand Down

0 comments on commit 52f0f5b

Please sign in to comment.