Skip to content

Commit

Permalink
Merge #509: Properly serialize surjection proof in caching checker
Browse files Browse the repository at this point in the history
50404af Properly serialize surjection proof in caching checker (Gregory Sanders)
  • Loading branch information
instagibbs committed Mar 6, 2019
2 parents d954b5e + 50404af commit 534a033
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/script/sigcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ bool CachingSurjectionProofChecker::VerifySurjectionProof(secp256k1_surjectionpr

// Serialize proof
std::vector<unsigned char> vchproof;
size_t proof_len = 0;
vchproof.resize(secp256k1_surjectionproof_serialized_size(secp256k1_ctx_verify_amounts, &proof));
secp256k1_surjectionproof_serialize(secp256k1_ctx_verify_amounts, &vchproof[0], &proof_len, &proof);
size_t proof_len = secp256k1_surjectionproof_serialized_size(secp256k1_ctx_verify_amounts, &proof);
vchproof.resize(proof_len);
assert(secp256k1_surjectionproof_serialize(secp256k1_ctx_verify_amounts, &vchproof[0], &proof_len, &proof) == 1);

// wtxid commits to all data including surj targets
// we need to specify the proof and output asset point to be unique
Expand Down

0 comments on commit 534a033

Please sign in to comment.