|
|
@ -5138,7 +5138,7 @@ UniValue faucetinfo(const UniValue& params, bool fHelp) |
|
|
|
|
|
|
|
UniValue faucetfund(const UniValue& params, bool fHelp) |
|
|
|
{ |
|
|
|
UniValue result(UniValue::VOBJ); uint64_t funds; std::string hex; |
|
|
|
UniValue result(UniValue::VOBJ); int64_t funds; std::string hex; |
|
|
|
if ( fHelp || params.size() > 1 ) |
|
|
|
throw runtime_error("faucetfund amount\n"); |
|
|
|
if ( ensure_CCrequirements() < 0 ) |
|
|
@ -5147,7 +5147,7 @@ UniValue faucetfund(const UniValue& params, bool fHelp) |
|
|
|
LOCK2(cs_main, pwalletMain->cs_wallet); |
|
|
|
funds = atof(params[0].get_str().c_str()) * COIN; |
|
|
|
if (funds > 0) { |
|
|
|
hex = FaucetFund(0,funds); |
|
|
|
hex = FaucetFund(0,(uint64_t) funds); |
|
|
|
if ( hex.size() > 0 ) |
|
|
|
{ |
|
|
|
result.push_back(Pair("result", "success")); |
|
|
|