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

Commit

Permalink
v1.17: [zk-token-sdk] Check that discrete log compression batch size …
Browse files Browse the repository at this point in the history
…is greater than 0 (backport of #33699) (#33844)

[zk-token-sdk] Check that discrete log compression batch size is greater than 0 (#33699)

check that discrete log compression batch size is greater than 0

(cherry picked from commit 381d225)

Co-authored-by: samkim-crypto <[email protected]>
  • Loading branch information
mergify[bot] and samkim-crypto authored Oct 24, 2023
1 parent 0471732 commit 5bd9969
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 5bd9969

Please sign in to comment.