Make MSM and Guard derive Clone

This commit is contained in:
therealyingtong 2020-09-13 11:33:44 +08:00
parent 14d1f41e08
commit 0633086ac1
No known key found for this signature in database
GPG key ID: 179F32A1503D607E

View file

@ -24,7 +24,7 @@ pub struct OpeningProof<C: CurveAffine> {
} }
/// A multiscalar multiplication in the polynomial commitment scheme /// A multiscalar multiplication in the polynomial commitment scheme
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct MSM<'a, C: CurveAffine> { pub struct MSM<'a, C: CurveAffine> {
params: &'a Params<C>, params: &'a Params<C>,
g_scalars: Option<Vec<C::Scalar>>, g_scalars: Option<Vec<C::Scalar>>,
@ -246,7 +246,7 @@ impl<C: CurveAffine> Params<C> {
} }
/// A guard returned by the verifier /// A guard returned by the verifier
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct Guard<'a, C: CurveAffine> { pub struct Guard<'a, C: CurveAffine> {
msm: MSM<'a, C>, msm: MSM<'a, C>,
neg_z1: C::Scalar, neg_z1: C::Scalar,