From a51c08d1a193e609280e440e67cc6a27107c8dd6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 19 Sep 2018 21:32:22 -1100 Subject: [PATCH] Test --- src/cc/CCPrices.h | 2 +- src/wallet/rpcwallet.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cc/CCPrices.h b/src/cc/CCPrices.h index d35823838..f375ee10a 100644 --- a/src/cc/CCPrices.h +++ b/src/cc/CCPrices.h @@ -24,7 +24,7 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx // CCcustom UniValue PricesList(); UniValue PricesInfo(uint256 fundingtxid); -UniValue PricesStatus(uint64_t txfee,uint256 fundingtxid,uint256 bettxid); +UniValue PricesStatus(uint64_t txfee,uint256 refbettoken,uint256 fundingtxid,uint256 bettxid); std::string PricesCreateFunding(uint64_t txfee,uint256 bettoken,uint256 oracletxid,uint64_t margin,uint64_t mode,uint256 longtoken,uint256 shorttoken,int32_t maxleverage,int64_t funding,std::vector pubkeys); std::string PricesAddFunding(uint64_t txfee,uint256 bettoken,uint256 fundingtxid,int64_t amount); std::string PricesBet(uint64_t txfee,uint256 bettoken,uint256 fundingtxid,int64_t amount,int32_t leverage); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 68c13b2b3..c1dd1c3fb 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4928,7 +4928,7 @@ UniValue oraclesaddress(const UniValue& params, bool fHelp) UniValue pricesaddress(const UniValue& params, bool fHelp) { - UniValue result(UniValue::VOBJ); struct CCcontract_info *cp,C,*assetscp,C2; std::vector pubkey; CPubKey mypk,pricespk; char myaddr[64],houseaddr[64],exposureaddr[64]; + UniValue result(UniValue::VOBJ); struct CCcontract_info *cp,C,*assetscp,C2; std::vector pubkey; CPubKey mypk,planpk,pricespk; char myaddr[64],houseaddr[64],exposureaddr[64]; cp = CCinit(&C,EVAL_PRICES); assetscp = CCinit(&C2,EVAL_PRICES); if ( fHelp || params.size() > 1 ) @@ -4940,9 +4940,9 @@ UniValue pricesaddress(const UniValue& params, bool fHelp) result = CCaddress(cp,(char *)"Prices",pubkey); mypk = pubkey2pk(Mypubkey()); pricespk = GetUnspendable(cp,0); - GetCCaddress(myaddr,assetscp,mypk); - GetCCaddress1of2(houseaddr,assetscp,pricespk,planpk); - GetCCaddress1of2(exposureaddr,assetscp,pricespk,pricespk); + GetCCaddress(assetscp,myaddr,mypk); + GetCCaddress1of2(assetscp,houseaddr,pricespk,planpk); + GetCCaddress1of2(assetscp,exposureaddr,pricespk,pricespk); result.push_back(Pair("myaddr",myaddr)); // for holding my asssets result.push_back(Pair("houseaddr",houseaddr)); // globally accessible house assets result.push_back(Pair("exposureaddr",exposureaddr)); // tracking of exposure @@ -5832,7 +5832,7 @@ UniValue pricesinfo(const UniValue& params, bool fHelp) UniValue pricescreate(const UniValue& params, bool fHelp) { - UniValue result(UniValue::VOBJ); uint64_t margin,mode; int32_t i,n,margin,maxleverage; std::string hex; uint256 oracletxid,longtoken,shorttoken,bettoken; std::vector pubkeys; std::vectorpubkey; + UniValue result(UniValue::VOBJ); uint64_t mode; int64_t funding; int32_t i,n,margin,maxleverage; std::string hex; uint256 oracletxid,longtoken,shorttoken,bettoken; std::vector pubkeys; std::vectorpubkey; if ( fHelp || params.size() < 8 ) throw runtime_error("pricescreate bettoken oracletxid margin mode longtoken shorttoken maxleverage funding N [pubkeys]\n"); if ( ensure_CCrequirements() < 0 )