Add optional bool to disable computation of proof in JSDescription constructor
This commit is contained in:
@@ -173,9 +173,10 @@ public:
|
||||
boost::array<uint256, NumOutputs>& out_commitments,
|
||||
uint64_t vpub_old,
|
||||
uint64_t vpub_new,
|
||||
const uint256& rt
|
||||
const uint256& rt,
|
||||
bool computeProof
|
||||
) {
|
||||
if (!pk) {
|
||||
if (computeProof && !pk) {
|
||||
throw std::runtime_error("JoinSplit proving key not loaded");
|
||||
}
|
||||
|
||||
@@ -231,6 +232,10 @@ public:
|
||||
out_macs[i] = PRF_pk(inputs[i].key, i, h_sig);
|
||||
}
|
||||
|
||||
if (!computeProof) {
|
||||
return ZCProof();
|
||||
}
|
||||
|
||||
protoboard<FieldT> pb;
|
||||
{
|
||||
joinsplit_gadget<FieldT, NumInputs, NumOutputs> g(pb);
|
||||
|
||||
Reference in New Issue
Block a user