From: miketout <23489320+miketout@users.noreply.github.com> Date: Thu, 29 Aug 2019 22:02:53 +0000 (-0700) Subject: Another approach to CC signature X-Git-Url: https://repo.jachan.dev/VerusCoin.git/commitdiff_plain/353949fe4d7352da69dc5f83f4737dace1a7bd4b Another approach to CC signature --- diff --git a/src/cc/CCutils.cpp b/src/cc/CCutils.cpp index 4ab447fc3..5333a094a 100644 --- a/src/cc/CCutils.cpp +++ b/src/cc/CCutils.cpp @@ -53,7 +53,8 @@ CC *MakeCCcond0(uint8_t evalcode) { std::vector pks; CC *condCC = CCNewEval(E_MARSHAL(ss << evalcode)); - return CCNewThreshold(1, {condCC}); + CC *Sig = CCNewThreshold(0, pks); + return CCNewThreshold(2, {condCC, Sig}); } CTxOut MakeCC1vout(uint8_t evalcode,CAmount nValue,CPubKey pk) diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 718ea4f27..7e2dfdd76 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -97,10 +97,9 @@ CC *CCcond1(uint8_t evalcode,CPubKey pk) return CCNewThreshold(2, {condCC, Sig}); } -CC *CCcond0(uint8_t evalcode, CPubKey pk) +CC *CCcond0(uint8_t evalcode) { std::vector pks; - pks.push_back(CCNewSecp256k1(pk)); CC *condCC = CCNewEval(E_MARSHAL(ss << evalcode)); CC *Sig = CCNewThreshold(0, pks); return CCNewThreshold(2, {condCC, Sig});