change to prices_getbetinfo()

This commit is contained in:
dimxy
2019-05-07 21:24:46 +05:00
parent 8610cf52f9
commit bac6d503af
5 changed files with 370 additions and 277 deletions

View File

@@ -1439,6 +1439,19 @@ UniValue pricesrekt(const UniValue& params, bool fHelp)
return PricesRekt(txfee, bettxid, height);
}
// pricesrekt rpc implementation
UniValue pricesgetorderbook(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error("pricesgetorderbook\n");
LOCK(cs_main);
UniValue ret(UniValue::VOBJ);
if (ASSETCHAINS_CBOPRET == 0)
throw JSONRPCError(RPC_INVALID_PARAMETER, "only -ac_cbopret chains have prices");
return PricesGetOrderbook();
}
UniValue gettxout(const UniValue& params, bool fHelp)
{