This commit is contained in:
jl777
2019-01-19 22:55:19 -11:00
parent df02d14c65
commit b1ec7e5afa
3 changed files with 7 additions and 7 deletions

View File

@@ -645,7 +645,7 @@ bool CClib_Dispatch(const CC *cond,Eval *eval,std::vector<uint8_t> paramsNull,co
uint8_t evalcode; int32_t height,from_mempool; struct CC_info *cp; uint8_t evalcode; int32_t height,from_mempool; struct CC_info *cp;
if ( ASSETCHAINS_CCLIB != MYCCLIBNAME ) if ( ASSETCHAINS_CCLIB != MYCCLIBNAME )
{ {
fprintf(stderr,"-ac_cclib=%s vs myname %s\n",ASSETCHAINS_CCLIB.c_str(),MYCCLIBNAME); fprintf(stderr,"-ac_cclib=%s vs myname %s\n",ASSETCHAINS_CCLIB.c_str(),MYCCLIBNAME.c_str());
return eval->Invalid("-ac_cclib name mismatches myname"); return eval->Invalid("-ac_cclib name mismatches myname");
} }
height = KOMODO_CONNECTING; height = KOMODO_CONNECTING;

View File

@@ -38,7 +38,7 @@ CClib_methods[] =
{ "faucet2_get", "<no args>", 0, 0, 'G' }, { "faucet2_get", "<no args>", 0, 0, 'G' },
}; };
#define MYCCLIBNAME ((char *)"stub") std::string MYCCLIBNAME = (char *)"stub";
char *CClib_name() { return(MYCCLIBNAME); } char *CClib_name() { return(MYCCLIBNAME); }

View File

@@ -47,11 +47,11 @@ public:
return CTxOut(amount, CScript() << ParseHex(HexStr(myPubkey)) << OP_CHECKSIG); return CTxOut(amount, CScript() << ParseHex(HexStr(myPubkey)) << OP_CHECKSIG);
} */ } */
static bool GetCoinsOrTokensCCaddress1of2(char *coinaddr, CPubKey ownerPubkey, CPubKey heirPubkey) { static bool GetCoinsOrTokensCCaddress1of2(char *coinaddr, CPubKey ownerPubkey, CPubKey heirPubkey) {
struct CC_info *cpHeir, heirC; struct CCcontract_info *cpHeir, heirC;
cpHeir = CCinit(&heirC, EVAL_HEIR); cpHeir = CCinit(&heirC, EVAL_HEIR);
return GetCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey); return GetCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey);
} }
static void CCaddrCoinsOrTokens1of2set(struct CC_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { static void CCaddrCoinsOrTokens1of2set(struct CCcontract_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) {
CCaddr1of2set(cp, ownerPubkey, heirPubkey, coinaddr); CCaddr1of2set(cp, ownerPubkey, heirPubkey, coinaddr);
} }
}; };
@@ -61,7 +61,7 @@ class TokenHelper {
public: public:
static uint8_t getMyEval() { return EVAL_TOKENS; } static uint8_t getMyEval() { return EVAL_TOKENS; }
static int64_t addOwnerInputs(uint256 tokenid, CMutableTransaction& mtx, CPubKey ownerPubkey, int64_t total, int32_t maxinputs) { static int64_t addOwnerInputs(uint256 tokenid, CMutableTransaction& mtx, CPubKey ownerPubkey, int64_t total, int32_t maxinputs) {
struct CC_info *cpHeir, heirC; struct CCcontract_info *cpHeir, heirC;
cpHeir = CCinit(&heirC, EVAL_TOKENS); cpHeir = CCinit(&heirC, EVAL_TOKENS);
return AddTokenCCInputs(cpHeir, mtx, ownerPubkey, tokenid, total, maxinputs); return AddTokenCCInputs(cpHeir, mtx, ownerPubkey, tokenid, total, maxinputs);
} }
@@ -89,12 +89,12 @@ public:
return MakeCC1vout(EVAL_TOKENS, amount, myPubkey); // yes EVAL_TOKENS return MakeCC1vout(EVAL_TOKENS, amount, myPubkey); // yes EVAL_TOKENS
} */ } */
static bool GetCoinsOrTokensCCaddress1of2(char *coinaddr, CPubKey ownerPubkey, CPubKey heirPubkey) { static bool GetCoinsOrTokensCCaddress1of2(char *coinaddr, CPubKey ownerPubkey, CPubKey heirPubkey) {
struct CC_info *cpHeir, heirC; struct CCcontract_info *cpHeir, heirC;
cpHeir = CCinit(&heirC, EVAL_HEIR); cpHeir = CCinit(&heirC, EVAL_HEIR);
return GetTokensCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey); return GetTokensCCaddress1of2(cpHeir, coinaddr, ownerPubkey, heirPubkey);
} }
static void CCaddrCoinsOrTokens1of2set(struct CC_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) { static void CCaddrCoinsOrTokens1of2set(struct CCcontract_info *cp, CPubKey ownerPubkey, CPubKey heirPubkey, char *coinaddr) {
CCaddrTokens1of2set(cp, ownerPubkey, heirPubkey, coinaddr); CCaddrTokens1of2set(cp, ownerPubkey, heirPubkey, coinaddr);
} }