From 53dc6a41ebcafd846de2a7bf7cdb658e7f9c1615 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 6 Dec 2016 18:42:31 -0700 Subject: [PATCH] Ensure ProofVerifier cannot be accidentally copied. --- src/zcash/Proof.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index c6ec45ee8..1f245e5e8 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -244,6 +244,12 @@ private: ProofVerifier(bool perform_verification) : perform_verification(perform_verification) { } public: + // ProofVerifier should never be copied + ProofVerifier(const ProofVerifier&) = delete; + ProofVerifier& operator=(const ProofVerifier&) = delete; + ProofVerifier(ProofVerifier&&); + ProofVerifier& operator=(ProofVerifier&&); + // Creates a verification context that strictly verifies // all proofs using libsnark's API. static ProofVerifier Strict();