Relax vout constraint

This commit is contained in:
jl777
2018-07-30 05:18:11 -11:00
parent 544593c6ab
commit 9025093e5a
4 changed files with 38 additions and 35 deletions

View File

@@ -5110,9 +5110,9 @@ 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; char *name;
UniValue result(UniValue::VOBJ); int64_t funds,minbet,maxbet,maxodds,timeoutblocks; std::string hex; char *name;
if ( fHelp || params.size() != 6 )
throw runtime_error("dicefund name funds minbet maxbet maxodds forfeitblocks\n");
throw runtime_error("dicefund name funds minbet maxbet maxodds timeoutblocks\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");
name = (char *)params[0].get_str().c_str();
@@ -5120,8 +5120,8 @@ UniValue dicefund(const UniValue& params, bool fHelp)
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);
timeoutblocks = atol(params[5].get_str().c_str());
hex = DiceCreateFunding(0,name,funds,minbet,maxbet,maxodds,timeoutblocks);
if ( hex.size() > 0 )
{
result.push_back(Pair("result", "success"));