From 395fac417354e3e62bed3787a98c303743bcd908 Mon Sep 17 00:00:00 2001 From: dimxy Date: Tue, 15 Jan 2019 14:09:50 +0500 Subject: [PATCH] corr cp param to ...addr1of2set --- src/cc/heir.cpp | 2 +- src/cc/heir_validate.h | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/cc/heir.cpp b/src/cc/heir.cpp index 8ee5d7e07..9769f6f87 100644 --- a/src/cc/heir.cpp +++ b/src/cc/heir.cpp @@ -909,7 +909,7 @@ template UniValue HeirClaim(uint256 fundingtxid, uint64_t txfee Myprivkey(myprivkey); // set pubkeys for finding 1of2 cc in FinalizeCCtx to sign it: - Helper::CCaddrCoinsOrTokens1of2set(ownerPubkey, heirPubkey, coinaddr); + Helper::CCaddrCoinsOrTokens1of2set(cp, ownerPubkey, heirPubkey, coinaddr); // add 1of2 vout validation pubkeys (this is for tokens): std::vector voutTokenPubkeys; diff --git a/src/cc/heir_validate.h b/src/cc/heir_validate.h index e9710a471..2ad905808 100644 --- a/src/cc/heir_validate.h +++ b/src/cc/heir_validate.h @@ -51,10 +51,8 @@ public: cpHeir = CCinit(&heirC, EVAL_HEIR); return GetCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey); } - static void CCaddrCoinsOrTokens1of2set(CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { - struct CCcontract_info *cpHeir, heirC; - cpHeir = CCinit(&heirC, EVAL_HEIR); - CCaddr1of2set(cpHeir, ownerPubkey, heirPubkey, coinaddr); + static void CCaddrCoinsOrTokens1of2set(struct CCcontract_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { + CCaddr1of2set(cp, ownerPubkey, heirPubkey, coinaddr); } }; @@ -96,10 +94,9 @@ public: return GetTokensCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey); } - static void CCaddrCoinsOrTokens1of2set(CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { - struct CCcontract_info *cpHeir, heirC; - cpHeir = CCinit(&heirC, EVAL_HEIR); - CCaddrTokens1of2set(cpHeir, ownerPubkey, heirPubkey, coinaddr); + static void CCaddrCoinsOrTokens1of2set(struct CCcontract_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { + + CCaddrTokens1of2set(cp, ownerPubkey, heirPubkey, coinaddr); } };