diff --git a/qa/rpc-tests/cryptoconditions.py b/qa/rpc-tests/cryptoconditions.py index 06f965340..97b41fd12 100755 --- a/qa/rpc-tests/cryptoconditions.py +++ b/qa/rpc-tests/cryptoconditions.py @@ -81,7 +81,6 @@ class CryptoConditionsTest (BitcoinTestFramework): result = rpc.faucetfund("1") assert_equal(result['result'], 'success') - assert_true(result['hex']) result = rpc.faucetfund("0") assert_equal(result['result'], 'error') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 386997b3f..744b95b57 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -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"));