changeset 26984:0acfe9bbe3c3

Merge #9987: Remove unused code 8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
author Wladimir J. van der Laan <laanwj@gmail.com>
date Sat, 18 Mar 2017 10:10:00 +0100
parents 9d8c73415792 d3663e3e190e
children 05650585dcbf
files src/net.cpp
diffstat 13 files changed, 0 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/src/bitcoin-tx.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/bitcoin-tx.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -483,22 +483,6 @@
     return false;
 }
 
-uint256 ParseHashUO(std::map<std::string,UniValue>& o, std::string strKey)
-{
-    if (!o.count(strKey))
-        return uint256();
-    return ParseHashUV(o[strKey], strKey);
-}
-
-std::vector<unsigned char> ParseHexUO(std::map<std::string,UniValue>& o, std::string strKey)
-{
-    if (!o.count(strKey)) {
-        std::vector<unsigned char> emptyVec;
-        return emptyVec;
-    }
-    return ParseHexUV(o[strKey], strKey);
-}
-
 static CAmount AmountFromValue(const UniValue& value)
 {
     if (!value.isNum() && !value.isStr())
--- a/src/chainparams.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/chainparams.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -135,7 +135,6 @@
 
         vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
 
-        fMiningRequiresPeers = true;
         fDefaultConsistencyChecks = false;
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
@@ -235,7 +234,6 @@
 
         vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
 
-        fMiningRequiresPeers = true;
         fDefaultConsistencyChecks = false;
         fRequireStandard = false;
         fMineBlocksOnDemand = false;
@@ -307,7 +305,6 @@
         vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
         vSeeds.clear();      //!< Regtest mode doesn't have any DNS seeds.
 
-        fMiningRequiresPeers = false;
         fDefaultConsistencyChecks = true;
         fRequireStandard = false;
         fMineBlocksOnDemand = true;
--- a/src/chainparams.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/chainparams.h	Sat Mar 18 10:10:00 2017 +0100
@@ -61,8 +61,6 @@
     int GetDefaultPort() const { return nDefaultPort; }
 
     const CBlock& GenesisBlock() const { return genesis; }
-    /** Make miner wait to have peers to avoid wasting work */
-    bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
     /** Default value for -checkmempool and -checkblockindex argument */
     bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
     /** Policy: Filter transactions that do not match well-defined patterns */
@@ -89,7 +87,6 @@
     std::string strNetworkID;
     CBlock genesis;
     std::vector<SeedSpec6> vFixedSeeds;
-    bool fMiningRequiresPeers;
     bool fDefaultConsistencyChecks;
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
--- a/src/coins.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/coins.h	Sat Mar 18 10:10:00 2017 +0100
@@ -290,7 +290,6 @@
 
     virtual bool GetKey(uint256 &key) const = 0;
     virtual bool GetValue(CCoins &coins) const = 0;
-    /* Don't care about GetKeySize here */
     virtual unsigned int GetValueSize() const = 0;
 
     virtual bool Valid() const = 0;
--- a/src/dbwrapper.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/dbwrapper.h	Sat Mar 18 10:10:00 2017 +0100
@@ -132,10 +132,6 @@
         return true;
     }
 
-    unsigned int GetKeySize() {
-        return piter->key().size();
-    }
-
     template<typename V> bool GetValue(V& value) {
         leveldb::Slice slValue = piter->value();
         try {
--- a/src/httpserver.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/httpserver.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -146,13 +146,6 @@
         while (numThreads > 0)
             cond.wait(lock);
     }
-
-    /** Return current depth of queue */
-    size_t Depth()
-    {
-        std::unique_lock<std::mutex> lock(cs);
-        return queue.size();
-    }
 };
 
 struct HTTPPathHandler
--- a/src/net.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/net.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -2411,11 +2411,6 @@
     addrman.Good(addr);
 }
 
-void CConnman::AddNewAddress(const CAddress& addr, const CAddress& addrFrom, int64_t nTimePenalty)
-{
-    addrman.Add(addr, addrFrom, nTimePenalty);
-}
-
 void CConnman::AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty)
 {
     addrman.Add(vAddr, addrFrom, nTimePenalty);
--- a/src/net.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/net.h	Sat Mar 18 10:10:00 2017 +0100
@@ -207,10 +207,8 @@
     size_t GetAddressCount() const;
     void SetServices(const CService &addr, ServiceFlags nServices);
     void MarkAddressGood(const CAddress& addr);
-    void AddNewAddress(const CAddress& addr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
     void AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
     std::vector<CAddress> GetAddresses();
-    void AddressCurrentlyConnected(const CService& addr);
 
     // Denial-of-service detection/prevention
     // The idea is to detect peers that are behaving
--- a/src/rpc/server.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/rpc/server.h	Sat Mar 18 10:10:00 2017 +0100
@@ -28,7 +28,6 @@
     void OnStarted(boost::function<void ()> slot);
     void OnStopped(boost::function<void ()> slot);
     void OnPreCommand(boost::function<void (const CRPCCommand&)> slot);
-    void OnPostCommand(boost::function<void (const CRPCCommand&)> slot);
 }
 
 class CBlockIndex;
--- a/src/sync.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/sync.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -46,8 +46,6 @@
         return mutexName + "  " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
     }
 
-    std::string MutexName() const { return mutexName; }
-
     bool fTry;
 private:
     std::string mutexName;
--- a/src/sync.h	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/sync.h	Sat Mar 18 10:10:00 2017 +0100
@@ -97,7 +97,6 @@
     }
 };
 
-typedef CCriticalSection CDynamicCriticalSection;
 /** Wrapped boost mutex: supports waiting but not recursive locking */
 typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection;
 
--- a/src/test/key_tests.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/test/key_tests.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -29,34 +29,6 @@
 static const std::string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF");
 
 
-#ifdef KEY_TESTS_DUMPINFO
-void dumpKeyInfo(uint256 privkey)
-{
-    CKey key;
-    key.resize(32);
-    memcpy(&secret[0], &privkey, 32);
-    std::vector<unsigned char> sec;
-    sec.resize(32);
-    memcpy(&sec[0], &secret[0], 32);
-    printf("  * secret (hex): %s\n", HexStr(sec).c_str());
-
-    for (int nCompressed=0; nCompressed<2; nCompressed++)
-    {
-        bool fCompressed = nCompressed == 1;
-        printf("  * %s:\n", fCompressed ? "compressed" : "uncompressed");
-        CBitcoinSecret bsecret;
-        bsecret.SetSecret(secret, fCompressed);
-        printf("    * secret (base58): %s\n", bsecret.ToString().c_str());
-        CKey key;
-        key.SetSecret(secret, fCompressed);
-        std::vector<unsigned char> vchPubKey = key.GetPubKey();
-        printf("    * pubkey (hex): %s\n", HexStr(vchPubKey).c_str());
-        printf("    * address (base58): %s\n", CBitcoinAddress(vchPubKey).ToString().c_str());
-    }
-}
-#endif
-
-
 BOOST_FIXTURE_TEST_SUITE(key_tests, BasicTestingSetup)
 
 BOOST_AUTO_TEST_CASE(key_test1)
--- a/src/test/script_tests.cpp	Fri Mar 17 20:34:55 2017 +0100
+++ b/src/test/script_tests.cpp	Sat Mar 18 10:10:00 2017 +0100
@@ -455,11 +455,6 @@
     {
         return comment;
     }
-
-    const CScript& GetScriptPubKey()
-    {
-        return creditTx->vout[0].scriptPubKey;
-    }
 };
 
 std::string JSONPrettyPrint(const UniValue& univalue)