Fix
This commit is contained in:
@@ -24,6 +24,6 @@
|
|||||||
bool DiceValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx);
|
bool DiceValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx);
|
||||||
|
|
||||||
std::string DiceFund(uint64_t txfee,uint64_t funds);
|
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
|
#endif
|
||||||
|
|||||||
@@ -5090,16 +5090,17 @@ UniValue faucetget(const UniValue& params, bool fHelp)
|
|||||||
UniValue dicefund(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;
|
UniValue result(UniValue::VOBJ); int64_t funds,minbet,maxbet,maxodds,forfeitblocks; std::string hex;
|
||||||
if ( fHelp || params.size() != 5 )
|
if ( fHelp || params.size() != 6 )
|
||||||
throw runtime_error("dicefund funds minbet maxbet maxodds forfeitblocks\n");
|
throw runtime_error("dicefund name funds minbet maxbet maxodds forfeitblocks\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
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");
|
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;
|
name = (char *)params[0].get_str().c_str();
|
||||||
minbet = atof(params[1].get_str().c_str()) * COIN;
|
funds = atof(params[1].get_str().c_str()) * COIN;
|
||||||
maxbet = atof(params[2].get_str().c_str()) * COIN;
|
minbet = atof(params[2].get_str().c_str()) * COIN;
|
||||||
maxodds = atol(params[3].get_str().c_str());
|
maxbet = atof(params[3].get_str().c_str()) * COIN;
|
||||||
forfeitblocks = atol(params[4].get_str().c_str());
|
maxodds = atol(params[4].get_str().c_str());
|
||||||
hex = DiceCreateFunding(0,funds,minbet,maxbet,maxodds,forfeitblocks);
|
forfeitblocks = atol(params[5].get_str().c_str());
|
||||||
|
hex = DiceCreateFunding(0,name,funds,minbet,maxbet,maxodds,forfeitblocks);
|
||||||
if ( hex.size() > 0 )
|
if ( hex.size() > 0 )
|
||||||
{
|
{
|
||||||
result.push_back(Pair("result", "success"));
|
result.push_back(Pair("result", "success"));
|
||||||
|
|||||||
Reference in New Issue
Block a user