diff --git a/src/cc/CCdice.h b/src/cc/CCdice.h index d7666032f..4b5f108ef 100644 --- a/src/cc/CCdice.h +++ b/src/cc/CCdice.h @@ -24,6 +24,6 @@ bool DiceValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx); std::string DiceFund(uint64_t txfee,uint64_t funds); -std::string DiceCreateFunding(uint64_t txfee,int64_t funds,int64_t minbet,int64_t maxbet,int64_t maxodds,int64_t forfeitblocks); +std::string DiceCreateFunding(uint64_t txfee,char *planstr,int64_t funds,int64_t minbet,int64_t maxbet,int64_t maxodds,int64_t forfeitblocks); #endif diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 7551a3825..03fc30eb9 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5090,16 +5090,17 @@ UniValue faucetget(const UniValue& params, bool fHelp) UniValue dicefund(const UniValue& params, bool fHelp) { UniValue result(UniValue::VOBJ); int64_t funds,minbet,maxbet,maxodds,forfeitblocks; std::string hex; - if ( fHelp || params.size() != 5 ) - throw runtime_error("dicefund funds minbet maxbet maxodds forfeitblocks\n"); + if ( fHelp || params.size() != 6 ) + throw runtime_error("dicefund name funds minbet maxbet maxodds forfeitblocks\n"); if ( ensure_CCrequirements() < 0 ) throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n"); - funds = atof(params[0].get_str().c_str()) * COIN; - minbet = atof(params[1].get_str().c_str()) * COIN; - maxbet = atof(params[2].get_str().c_str()) * COIN; - maxodds = atol(params[3].get_str().c_str()); - forfeitblocks = atol(params[4].get_str().c_str()); - hex = DiceCreateFunding(0,funds,minbet,maxbet,maxodds,forfeitblocks); + name = (char *)params[0].get_str().c_str(); + funds = atof(params[1].get_str().c_str()) * COIN; + minbet = atof(params[2].get_str().c_str()) * COIN; + maxbet = atof(params[3].get_str().c_str()) * COIN; + maxodds = atol(params[4].get_str().c_str()); + forfeitblocks = atol(params[5].get_str().c_str()); + hex = DiceCreateFunding(0,name,funds,minbet,maxbet,maxodds,forfeitblocks); if ( hex.size() > 0 ) { result.push_back(Pair("result", "success"));