Settle stub

This commit is contained in:
jl777
2019-03-27 07:10:30 -11:00
parent 2dfd8dacdb
commit 7596077f2a
3 changed files with 18 additions and 1 deletions

View File

@@ -17,6 +17,13 @@
UniValue games_rawtxresult(UniValue &result,std::string rawtx,int32_t broadcastflag);
extern uint8_t ASSETCHAINS_OVERRIDE_PUBKEY33[33];
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
{
UniValue result;
return(result);
}
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
{
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());

View File

@@ -66,7 +66,13 @@ int32_t games_payloadrecv(CPubKey pk,uint32_t timestamp,std::vector<uint8_t> pay
} else return(-1);
}
UniValue games_oracledata(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
{
UniValue result;
return(result);
}
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
{
UniValue result;
return(result);

View File

@@ -47,6 +47,7 @@ std::string Games_pname;
{ (char *)MYCCNAME, (char *)"events", (char *)"eventshex [gametxid [eventid]]", 1, 3, ' ', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"extract", (char *)"gametxid [pubkey]", 1, 2, ' ', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"bet", (char *)"amount hexstr", 2, 2, ' ', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"settle", (char *)"height", 1, 1, ' ', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"register", (char *)"gametxid [playertxid]", 1, 2, 'R', EVAL_GAMES },
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx);
@@ -67,6 +68,7 @@ UniValue games_events(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_extract(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_bet(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_settle(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
#define CUSTOM_DISPATCH \
if ( cp->evalcode == EVAL_GAMES ) \
@@ -105,6 +107,8 @@ if ( cp->evalcode == EVAL_GAMES ) \
return(games_fund(txfee,cp,params)); \
else if ( strcmp(method,"bet") == 0 ) \
return(games_bet(txfee,cp,params)); \
else if ( strcmp(method,"settle") == 0 ) \
return(games_settle(txfee,cp,params)); \
else \
{ \
result.push_back(Pair("result","error")); \