Improve/Fix variable names

ZCProof was too general. pubKeyHash was actually the JoinSplit pubkey
itself.
This commit is contained in:
Ariel Gabizon
2018-06-09 20:27:07 -07:00
parent 847df81f09
commit e1a3461cc2
13 changed files with 82 additions and 81 deletions

View File

@@ -176,7 +176,7 @@ public:
};
// Compressed zkSNARK proof
class ZCProof {
class PHGRProof {
private:
CompressedG1 g_A;
CompressedG1 g_A_prime;
@@ -188,18 +188,18 @@ private:
CompressedG1 g_H;
public:
ZCProof() : g_A(), g_A_prime(), g_B(), g_B_prime(), g_C(), g_C_prime(), g_K(), g_H() { }
PHGRProof() : g_A(), g_A_prime(), g_B(), g_B_prime(), g_C(), g_C_prime(), g_K(), g_H() { }
// Produces a compressed proof using a libsnark zkSNARK proof
template<typename libsnark_proof>
ZCProof(const libsnark_proof& proof);
PHGRProof(const libsnark_proof& proof);
// Produces a libsnark zkSNARK proof out of this proof,
// or throws an exception if it is invalid.
template<typename libsnark_proof>
libsnark_proof to_libsnark_proof() const;
static ZCProof random_invalid();
static PHGRProof random_invalid();
ADD_SERIALIZE_METHODS;
@@ -215,7 +215,7 @@ public:
READWRITE(g_H);
}
friend bool operator==(const ZCProof& a, const ZCProof& b)
friend bool operator==(const PHGRProof& a, const PHGRProof& b)
{
return (
a.g_A == b.g_A &&
@@ -229,7 +229,7 @@ public:
);
}
friend bool operator!=(const ZCProof& a, const ZCProof& b)
friend bool operator!=(const PHGRProof& a, const PHGRProof& b)
{
return !(a == b);
}