Skip to content

Commit

Permalink
Ensure downsize trims when required.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkerber committed Apr 29, 2024
1 parent 2a0b0bd commit b7e49d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion halo2_proofs/src/poly/kzg/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,12 @@ where

fn downsize(&mut self, k: u32) {
assert!(k <= self.k);
let n = 1 << k;
if n < self.trimed_size {
*self = self.clone().trim(n as usize);
}
self.k = k;
self.n = 1 << k;
self.n = n as u64;
}

fn empty_msm(&'params self) -> MSMKZG<E> {
Expand Down

0 comments on commit b7e49d5

Please sign in to comment.