diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index b94cb7dfe..026c75181 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -663,7 +663,7 @@ int64_t prices_syntheticprofits(int64_t &costbasis, int32_t firstheight, int32_t //std::cerr << "prices_syntheticprofits() profits double=" << (double)price / (double)costbasis -1.0 << std::endl; //double dprofits = (double)price / (double)costbasis - 1.0; - profits *= leverage * positionsize; + profits *= leverage * positionsize / SATOSHIDEN; //dprofits *= leverage * positionsize; std::cerr << "prices_syntheticprofits() val profits=" << profits << std::endl; //std::cerr << "prices_syntheticprofits() dprofits=" << dprofits << std::endl; diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index fefec1337..1f6fcadcf 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1358,7 +1358,7 @@ UniValue pricesaddfunding(const UniValue& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error("pricesaddfunding bettxid amount\n" - "where amount is in satoshis\n"); + "where amount is in coins\n"); LOCK(cs_main); UniValue ret(UniValue::VOBJ); @@ -1370,7 +1370,7 @@ UniValue pricesaddfunding(const UniValue& params, bool fHelp) if (bettxid.IsNull()) throw runtime_error("invalid bettxid\n"); - CAmount amount = atoll(params[1].get_str().c_str()); + CAmount amount = atof(params[1].get_str().c_str()) * COIN; if (amount <= 0) throw runtime_error("invalid amount\n");