File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,6 @@ pub struct Morphism<G: Group> {
5959 pub group_elements : Vec < G > ,
6060 /// The total number of scalar variables allocated.
6161 pub num_scalars : usize ,
62- ///The total number of group elements allocated.
63- pub num_elements : usize ,
6462}
6563
6664/// Perform a simple multi-scalar multiplication (MSM) over scalars and points.
@@ -93,7 +91,6 @@ impl<G: Group> Morphism<G> {
9391 linear_combination : Vec :: new ( ) ,
9492 group_elements : Vec :: new ( ) ,
9593 num_scalars : 0 ,
96- num_elements : 0 ,
9794 }
9895 }
9996
@@ -205,13 +202,11 @@ where
205202 /// # Returns
206203 /// A vector of [`PointVar`] representing the newly allocated group element indices.
207204 pub fn allocate_elements ( & mut self , n : usize ) -> Vec < PointVar > {
208- let start = self . morphism . num_elements ;
205+ let start = self . morphism . group_elements . len ( ) ;
209206 self . morphism
210207 . group_elements
211208 . extend ( repeat_n ( G :: identity ( ) , n) ) ;
212- let points = ( start..start + n) . map ( PointVar ) . collect :: < Vec < _ > > ( ) ;
213- self . morphism . num_elements += n;
214- points
209+ ( start..start + n) . map ( PointVar ) . collect :: < Vec < _ > > ( )
215210 }
216211
217212 /// Sets the values of group elements at specified indices.
You can’t perform that action at this time.
0 commit comments