Skip to content

Commit

Permalink
[zk-token-sdk] Check that discrete log compression batch size is grea…
Browse files Browse the repository at this point in the history
…ter than 0 (solana-labs#33699)

check that discrete log compression batch size is greater than 0
  • Loading branch information
samkim-crypto committed Oct 24, 2023
1 parent 6470544 commit 381d225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zk-token-sdk/src/encryption/discrete_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl DiscreteLog {
&mut self,
compression_batch_size: usize,
) -> Result<(), DiscreteLogError> {
if compression_batch_size >= TWO16 as usize {
if compression_batch_size >= TWO16 as usize || compression_batch_size == 0 {
return Err(DiscreteLogError::DiscreteLogBatchSize);
}
self.compression_batch_size = compression_batch_size;
Expand Down

0 comments on commit 381d225

Please sign in to comment.