From 38dc994731fe9a5d9fd9730307ad4c1403d0d17a Mon Sep 17 00:00:00 2001 From: Duke Date: Sat, 6 Jan 2024 21:49:17 -0500 Subject: [PATCH] Remove unused code --- src/cc/prices.cpp | 71 ----------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 3c9bb2556..852ea5eb4 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -26,39 +26,6 @@ #define NVOUT_CCMARKER 1 #define NVOUT_NORMALMARKER 3 -typedef struct OneBetData { - int64_t positionsize; - int32_t firstheight; - int64_t costbasis; - int64_t profits; - - OneBetData() { positionsize = 0; firstheight = 0; costbasis = 0; profits = 0; } -} onebetdata; - -typedef struct BetInfo { - uint256 txid; - int64_t averageCostbasis, firstprice, lastprice, liquidationprice, equity; - int64_t exitfee; - int32_t lastheight; - int16_t leverage; - bool isOpen, isRekt; - uint256 tokenid; - - std::vector vecparsed; - std::vector bets; - CPubKey pk; - - bool isUp; - - BetInfo() { - averageCostbasis = firstprice = lastprice = liquidationprice = equity = 0; - lastheight = 0; - leverage = 0; - exitfee = 0; - isOpen = isRekt = isUp = false; - } -} BetInfo; - typedef struct MatchedBookTotal { int64_t diffLeveragedPosition; @@ -250,23 +217,12 @@ int32_t prices_syntheticprofits(int64_t &costbasis, int32_t firstheight, int32_t return 0; } -// makes result json object -void prices_betjson(UniValue &result, std::vector bets, int16_t leverage, int32_t endheight, int64_t lastprice) -{ -} - // retrieves costbasis from a tx spending bettx vout1 (deprecated) int64_t prices_costbasis(CTransaction bettx, uint256 &txidCostbasis) { return 0; } -// enumerates and retrieves added bets, returns the last baton txid -int64_t prices_enumaddedbets(uint256 &batontxid, std::vector &bets, uint256 bettxid) -{ - return 0; -} - // pricesbet rpc impl: make betting tx UniValue PricesBet(int64_t txfee, int64_t amount, int16_t leverage, std::vector synthetic) { @@ -281,11 +237,6 @@ UniValue PricesAddFunding(int64_t txfee, uint256 bettxid, int64_t amount) return(result); } -// scan chain from the initial bet's first position upto the chain tip and calculate bet's costbasises and profits, breaks if rekt detected -int32_t prices_scanchain(std::vector &bets, int16_t leverage, std::vector vec, int64_t &lastprice, int32_t &endheight) { - return 0; -} - // pricescostbasis rpc impl: set cost basis (open price) for the bet (deprecated) UniValue PricesSetcostbasis(int64_t txfee, uint256 bettxid) { @@ -302,11 +253,6 @@ UniValue PricesRefillFund(int64_t amount) } -int32_t prices_getbetinfo(uint256 bettxid, BetInfo &betinfo) -{ - return (-420); -} - // pricesrekt rpc: anyone can rekt a bet at some block where losses reached limit, collecting fee UniValue PricesRekt(int64_t txfee, uint256 bettxid, int32_t rektheight) { @@ -337,29 +283,12 @@ UniValue PricesList(uint32_t filter, CPubKey mypk) } -static bool prices_addbookentry(uint256 txid, std::vector &book) -{ - return false; -} - - static bool prices_ispositionup(const std::vector &vecparsed, int16_t leverage) { return false; } -static bool prices_isopposite(BetInfo p1, BetInfo p2) { - return false; -} - - - -static std::string findMatchedBook(const std::vector &vecparsed, const std::map > & bookmatched) { - return std::string(""); -} -void prices_getorderbook(std::map > & bookmatched, std::map &matchedTotals, TotalFund &fundTotals) { -} static bool prices_isacceptableamount(const std::vector &vecparsed, int64_t amount, int16_t leverage) { return false;