Remove unused code
Zcash: Excludes code that is still in use for us. (cherry picked from commit bitcoin/bitcoin@8dc957ae06)
This commit is contained in:
parent
b031444591
commit
85fdbf3af8
|
@ -334,22 +334,6 @@ static bool findSighashFlags(int& flags, const std::string& flagStr)
|
||||||
return false;
|
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)
|
static CAmount AmountFromValue(const UniValue& value)
|
||||||
{
|
{
|
||||||
if (!value.isNum() && !value.isStr())
|
if (!value.isNum() && !value.isStr())
|
||||||
|
|
|
@ -121,10 +121,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int GetKeySize() {
|
|
||||||
return piter->key().size();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename V> bool GetValue(V& value) {
|
template<typename V> bool GetValue(V& value) {
|
||||||
leveldb::Slice slValue = piter->value();
|
leveldb::Slice slValue = piter->value();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -120,13 +120,6 @@ public:
|
||||||
running = false;
|
running = false;
|
||||||
cond.notify_all();
|
cond.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return current depth of queue */
|
|
||||||
size_t Depth()
|
|
||||||
{
|
|
||||||
std::unique_lock<std::mutex> lock(cs);
|
|
||||||
return queue.size();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HTTPPathHandler
|
struct HTTPPathHandler
|
||||||
|
|
|
@ -46,8 +46,6 @@ struct CLockLocation {
|
||||||
return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
|
return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MutexName() const { return mutexName; }
|
|
||||||
|
|
||||||
bool fTry;
|
bool fTry;
|
||||||
private:
|
private:
|
||||||
std::string mutexName;
|
std::string mutexName;
|
||||||
|
|
|
@ -101,7 +101,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef CCriticalSection CDynamicCriticalSection;
|
|
||||||
/** Wrapped boost mutex: supports waiting but not recursive locking */
|
/** Wrapped boost mutex: supports waiting but not recursive locking */
|
||||||
typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection;
|
typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection;
|
||||||
|
|
||||||
|
|
|
@ -37,35 +37,6 @@ static const std::string addr2C = "t1VJL2dPUyXK7avDRGqhqQA5bw2eEMdhyg6";
|
||||||
static const std::string strAddressBad = "t1aMkLwU1LcMZYN7TgXUJAwzA1r44dbLkSp";
|
static const std::string strAddressBad = "t1aMkLwU1LcMZYN7TgXUJAwzA1r44dbLkSp";
|
||||||
|
|
||||||
|
|
||||||
#ifdef KEY_TESTS_DUMPINFO
|
|
||||||
void dumpKeyInfo(uint256 privkey)
|
|
||||||
{
|
|
||||||
CKey key;
|
|
||||||
key.resize(32);
|
|
||||||
memcpy(&secret[0], &privkey, 32);
|
|
||||||
vector<unsigned char> sec;
|
|
||||||
sec.resize(32);
|
|
||||||
memcpy(&sec[0], &secret[0], 32);
|
|
||||||
printf(" * secret (hex): %s\n", HexStr(sec).c_str());
|
|
||||||
|
|
||||||
KeyIO keyIO(Params());
|
|
||||||
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);
|
|
||||||
vector<unsigned char> vchPubKey = key.GetPubKey();
|
|
||||||
printf(" * pubkey (hex): %s\n", HexStr(vchPubKey).c_str());
|
|
||||||
printf(" * address (base58): %s\n", keyIO.EncodeDestination(vchPubKey).c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_FIXTURE_TEST_SUITE(key_tests, BasicTestingSetup)
|
BOOST_FIXTURE_TEST_SUITE(key_tests, BasicTestingSetup)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(key_test1)
|
BOOST_AUTO_TEST_CASE(key_test1)
|
||||||
|
|
|
@ -305,11 +305,6 @@ public:
|
||||||
{
|
{
|
||||||
return comment;
|
return comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CScript& GetScriptPubKey()
|
|
||||||
{
|
|
||||||
return creditTx.vout[0].scriptPubKey;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue