From 5578bc81b9cb9cf8f0233b70b2f7976e028324b2 Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 11 Nov 2024 08:25:38 -0500 Subject: [PATCH] Remove dead code --- src/cc/CCinclude.h | 15 ---------- src/cc/CCutils.cpp | 70 ---------------------------------------------- 2 files changed, 85 deletions(-) diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index 053a2bd9c..0c7737234 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -195,7 +195,6 @@ bool myIsutxo_spentinmempool(uint256 &spenttxid,int32_t &spentvini,uint256 txid, bool myAddtomempool(CTransaction &tx, CValidationState *pstate = NULL, bool fSkipExpiry = false); bool mytxid_inmempool(uint256 txid); int32_t myIsutxo_spent(uint256 &spenttxid,uint256 txid,int32_t vout); -int32_t myGet_mempool_txs(std::vector &txs,uint8_t evalcode,uint8_t funcid); /// \endcond /// \cond INTERNAL @@ -367,8 +366,6 @@ CPubKey pubkey2pk(std::vector vpubkey); /// @param tokenid id of token (id of token creation tx) int64_t CCfullsupply(uint256 tokenid); -/// @private -bool ConstrainVout(CTxOut vout,int32_t CCflag,char *cmpaddr,int64_t nValue); /// Returns bitcoin address for the scriptPubKey parameter /// @param[out] destaddr the returned address of the scriptPubKey, the buffer should have size of at least 64 chars @@ -376,15 +373,6 @@ bool ConstrainVout(CTxOut vout,int32_t CCflag,char *cmpaddr,int64_t nValue); /// @returns true if success bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey); -/// Returns custom bitcoin address for the scriptPubKey parameter -/// @param[out] destaddr the returned address of the scriptPubKey, the buffer should have size of at least 64 chars -/// @param scriptPubKey scriptPubKey object -/// @param taddr custom address prefix -/// @param prefix custom pubkey prefix -/// @param prefix2 custom script prefix -/// @returns true if success -bool GetCustomscriptaddress(char *destaddr,const CScript &scriptPubKey,uint8_t taddr,uint8_t prefix,uint8_t prefix2); - /// Returns my pubkey, that is set by -pubkey hushd parameter /// @returns public key as byte array std::vector Mypubkey(); @@ -524,9 +512,6 @@ bits256 bits256_doublesha256(char *deprecated,uint8_t *data,int32_t datalen); // UniValue ValueFromAmount(const CAmount& amount); // defined in server.h /*! \endcond */ -/*! \cond INTERNAL */ -int64_t TotalPubkeyNormalInputs(const CTransaction &tx, const CPubKey &pubkey); -int64_t TotalPubkeyCCInputs(const CTransaction &tx, const CPubKey &pubkey); inline std::string STR_TOLOWER(const std::string &str) { std::string out; for (std::string::const_iterator i = str.begin(); i != str.end(); i++) out += std::tolower(*i); return out; } /*! \endcond */ diff --git a/src/cc/CCutils.cpp b/src/cc/CCutils.cpp index bb4c3cd12..6e3f2f735 100644 --- a/src/cc/CCutils.cpp +++ b/src/cc/CCutils.cpp @@ -116,11 +116,6 @@ bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey) return(false); } -bool GetCustomscriptaddress(char *destaddr,const CScript &scriptPubKey,uint8_t taddr,uint8_t prefix, uint8_t prefix2) -{ - return(false); -} - bool pubkey2addr(char *destaddr,uint8_t *pubkey33) { std::vectorpk; int32_t i; @@ -129,11 +124,6 @@ bool pubkey2addr(char *destaddr,uint8_t *pubkey33) return(Getscriptaddress(destaddr,CScript() << pk << OP_CHECKSIG)); } -bool ConstrainVout(CTxOut vout, int32_t CCflag, char *cmpaddr, int64_t nValue) -{ - return false; -} - bool priv2addr(char *coinaddr,uint8_t *buf33,uint8_t priv32[32]) { CKey priv; CPubKey pk; int32_t i; uint8_t *src; @@ -173,57 +163,9 @@ CPubKey GetUnspendable(struct CCcontract_info *cp,uint8_t *unspendablepriv) int32_t NSPV_coinaddr_inmempool(char const *logcategory,char *coinaddr,uint8_t CCflag); -int32_t myIs_coinaddr_inmempoolvout(char const *logcategory,char *coinaddr) -{ - int32_t i,n; char destaddr[64]; - if ( HUSH_NSPV_SUPERLITE ) - return(NSPV_coinaddr_inmempool(logcategory,coinaddr,1)); - BOOST_FOREACH(const CTxMemPoolEntry &e,mempool.mapTx) - { - const CTransaction &tx = e.GetTx(); - if ( (n= tx.vout.size()) > 0 ) - { - const uint256 &txid = tx.GetHash(); - for (i=0; i &txs,uint8_t evalcode,uint8_t funcid) -{ - int i=0; - - if ( HUSH_NSPV_SUPERLITE ) - { - CTransaction tx; uint256 hashBlock; - - NSPV_evalcode_inmempool(evalcode,funcid); - for (int i=0;i