Check for no entries left in blocktree in a given slot

There may not be ENTRIES_PER_SEGMENT entries a slot, if so
then we will hang waiting for more.
This commit is contained in:
Stephen Akridge 2019-03-05 11:17:59 -08:00 committed by sakridge
parent 8e70f5bf84
commit 0f1d6c6271
1 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,9 @@ pub fn chacha_cbc_encrypt_file_many_keys(
"chacha_cuda: encrypting segment: {} num_entries: {} entry_len: {}",
segment, num_entries, entry_len
);
if num_entries == 0 {
break;
}
let entry_len_usz = entry_len as usize;
unsafe {
chacha_cbc_encrypt_many_sample(