Merge #9987: Remove unused code
8dc957a
Remove unused code (practicalswift)
Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
This commit is contained in:
commit
aab1e55860
13 changed files with 0 additions and 78 deletions
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2411,11 +2411,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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -97,7 +97,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
typedef CCriticalSection CDynamicCriticalSection;
|
||||
/** Wrapped boost mutex: supports waiting but not recursive locking */
|
||||
typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -455,11 +455,6 @@ public:
|
|||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
const CScript& GetScriptPubKey()
|
||||
{
|
||||
return creditTx->vout[0].scriptPubKey;
|
||||
}
|
||||
};
|
||||
|
||||
std::string JSONPrettyPrint(const UniValue& univalue)
|
||||
|
|
Loading…
Reference in a new issue