diff options
-rw-r--r-- | src/bitcoin-tx.cpp | 16 | ||||
-rw-r--r-- | src/chainparams.cpp | 3 | ||||
-rw-r--r-- | src/chainparams.h | 3 | ||||
-rw-r--r-- | src/coins.h | 1 | ||||
-rw-r--r-- | src/dbwrapper.h | 4 | ||||
-rw-r--r-- | src/httpserver.cpp | 7 | ||||
-rw-r--r-- | src/net.cpp | 5 | ||||
-rw-r--r-- | src/net.h | 2 | ||||
-rw-r--r-- | src/rpc/server.h | 1 | ||||
-rw-r--r-- | src/sync.cpp | 2 | ||||
-rw-r--r-- | src/sync.h | 1 | ||||
-rw-r--r-- | src/test/key_tests.cpp | 28 | ||||
-rw-r--r-- | src/test/script_tests.cpp | 5 |
13 files changed, 0 insertions, 78 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 3c3646523a..61e0eb74e6 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -483,22 +483,6 @@ static bool findSighashFlags(int& flags, const std::string& flagStr) 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()) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 8c38558829..1dc29826af 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -135,7 +135,6 @@ public: vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); - fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; fRequireStandard = true; fMineBlocksOnDemand = false; @@ -235,7 +234,6 @@ public: vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); - fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; fRequireStandard = false; fMineBlocksOnDemand = false; @@ -307,7 +305,6 @@ public: 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; diff --git a/src/chainparams.h b/src/chainparams.h index db524e8f8e..4fe88c691c 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -61,8 +61,6 @@ public: 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 @@ protected: std::string strNetworkID; CBlock genesis; std::vector<SeedSpec6> vFixedSeeds; - bool fMiningRequiresPeers; bool fDefaultConsistencyChecks; bool fRequireStandard; bool fMineBlocksOnDemand; diff --git a/src/coins.h b/src/coins.h index d921f5c2a5..8ee49b33ae 100644 --- a/src/coins.h +++ b/src/coins.h @@ -290,7 +290,6 @@ public: 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; diff --git a/src/dbwrapper.h b/src/dbwrapper.h index dd59cc00ff..414df76a7c 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -132,10 +132,6 @@ public: return true; } - unsigned int GetKeySize() { - return piter->key().size(); - } - template<typename V> bool GetValue(V& value) { leveldb::Slice slValue = piter->value(); try { diff --git a/src/httpserver.cpp b/src/httpserver.cpp index e1763c6ad2..dbd08ff2e1 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -146,13 +146,6 @@ public: 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 diff --git a/src/net.cpp b/src/net.cpp index 4434793c4c..e0163e6b17 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2406,11 +2406,6 @@ void CConnman::MarkAddressGood(const CAddress& addr) 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); @@ -207,10 +207,8 @@ public: 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 diff --git a/src/rpc/server.h b/src/rpc/server.h index 68d8a6ec96..ad064e5690 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -28,7 +28,6 @@ namespace RPCServer 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; diff --git a/src/sync.cpp b/src/sync.cpp index fce57f1df9..552682ab67 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -46,8 +46,6 @@ struct CLockLocation { return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : ""); } - std::string MutexName() const { return mutexName; } - bool fTry; private: std::string mutexName; diff --git a/src/sync.h b/src/sync.h index 3b29050e0e..9274f50d8b 100644 --- a/src/sync.h +++ b/src/sync.h @@ -97,7 +97,6 @@ public: } }; -typedef CCriticalSection CDynamicCriticalSection; /** Wrapped boost mutex: supports waiting but not recursive locking */ typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection; diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp index 40a7fdf11d..559b3caf1c 100644 --- a/src/test/key_tests.cpp +++ b/src/test/key_tests.cpp @@ -29,34 +29,6 @@ static const CBitcoinAddress addr2C("1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs"); 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) diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 32184165f7..c365ad7555 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -455,11 +455,6 @@ public: { return comment; } - - const CScript& GetScriptPubKey() - { - return creditTx->vout[0].scriptPubKey; - } }; std::string JSONPrettyPrint(const UniValue& univalue) |