This commit is contained in:
jl777
2019-03-22 00:48:24 -11:00
parent e66ec82ea2
commit b0009ecca2
3 changed files with 46 additions and 7 deletions

View File

@@ -7,18 +7,18 @@ std::string MYCCLIBNAME = (char *)"gamescc";
#define MYCCNAME "games"
#define RPC_FUNCS \
{ (char *)MYCCNAME, (char *)"func0", (char *)"<parameter help>", 1, 1, '0', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"rng", (char *)"hash,seed,playerid", 2, 3, '0', EVAL_GAMES }, \
{ (char *)MYCCNAME, (char *)"func1", (char *)"<no args>", 0, 0, '1', EVAL_GAMES },
bool games_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx);
UniValue games_func0(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_rng(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
UniValue games_func1(uint64_t txfee,struct CCcontract_info *cp,cJSON *params);
#define CUSTOM_DISPATCH \
if ( cp->evalcode == EVAL_GAMES ) \
{ \
if ( strcmp(method,"func0") == 0 ) \
return(games_func0(txfee,cp,params)); \
if ( strcmp(method,"rng") == 0 ) \
return(games_rng(txfee,cp,params)); \
else if ( strcmp(method,"func1") == 0 ) \
return(games_func1(txfee,cp,params)); \
else \