mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #10075: Remove unused C++ code not covered by unit tests
b51aaf1
Remove unused C++ code not covered by unit tests (practicalswift)
Tree-SHA512: 267bbd87df01a296bf23e82a8b6ee968e13e23a6aaecc535d803890a3e3e9f6208c7fc4c1f97afd98ed3e498b12fe1ada7e3cb2977ad12359a813f57336c74e5
This commit is contained in:
parent
d9ac44740f
commit
ed68d2ca12
@ -144,8 +144,3 @@ std::string GetDevNetName()
|
|||||||
std::string devNetName = GetArg("-devnet", "");
|
std::string devNetName = GetArg("-devnet", "");
|
||||||
return "devnet" + (devNetName.empty() ? "" : "-" + devNetName);
|
return "devnet" + (devNetName.empty() ? "" : "-" + devNetName);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AreBaseParamsConfigured()
|
|
||||||
{
|
|
||||||
return pCurrentBaseParams != NULL;
|
|
||||||
}
|
|
||||||
|
@ -56,10 +56,4 @@ std::string ChainNameFromCommandLine();
|
|||||||
|
|
||||||
std::string GetDevNetName();
|
std::string GetDevNetName();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if SelectBaseParamsFromCommandLine() has been called to select
|
|
||||||
* a network.
|
|
||||||
*/
|
|
||||||
bool AreBaseParamsConfigured();
|
|
||||||
|
|
||||||
#endif // BITCOIN_CHAINPARAMSBASE_H
|
#endif // BITCOIN_CHAINPARAMSBASE_H
|
||||||
|
@ -131,14 +131,6 @@ void CKey::MakeNewKey(bool fCompressedIn) {
|
|||||||
fCompressed = fCompressedIn;
|
fCompressed = fCompressedIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
|
|
||||||
if (!ec_privkey_import_der(secp256k1_context_sign, (unsigned char*)begin(), &privkey[0], privkey.size()))
|
|
||||||
return false;
|
|
||||||
fCompressed = fCompressedIn;
|
|
||||||
fValid = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPrivKey CKey::GetPrivKey() const {
|
CPrivKey CKey::GetPrivKey() const {
|
||||||
assert(fValid);
|
assert(fValid);
|
||||||
CPrivKey privkey;
|
CPrivKey privkey;
|
||||||
|
@ -94,9 +94,6 @@ public:
|
|||||||
//! Check whether the public key corresponding to this private key is (to be) compressed.
|
//! Check whether the public key corresponding to this private key is (to be) compressed.
|
||||||
bool IsCompressed() const { return fCompressed; }
|
bool IsCompressed() const { return fCompressed; }
|
||||||
|
|
||||||
//! Initialize from a CPrivKey (serialized OpenSSL private key data).
|
|
||||||
bool SetPrivKey(const CPrivKey& vchPrivKey, bool fCompressed);
|
|
||||||
|
|
||||||
//! Generate a new private key using a cryptographic PRNG.
|
//! Generate a new private key using a cryptographic PRNG.
|
||||||
void MakeNewKey(bool fCompressed);
|
void MakeNewKey(bool fCompressed);
|
||||||
|
|
||||||
|
@ -182,12 +182,6 @@ bool CNetAddr::IsLocal() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CNetAddr::IsMulticast() const
|
|
||||||
{
|
|
||||||
return (IsIPv4() && (GetByte(3) & 0xF0) == 0xE0)
|
|
||||||
|| (GetByte(15) == 0xFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CNetAddr::IsValid() const
|
bool CNetAddr::IsValid() const
|
||||||
{
|
{
|
||||||
// Cleanup 3-byte shifted addresses caused by garbage in size field
|
// Cleanup 3-byte shifted addresses caused by garbage in size field
|
||||||
|
@ -67,7 +67,6 @@ class CNetAddr
|
|||||||
bool IsLocal() const;
|
bool IsLocal() const;
|
||||||
bool IsRoutable() const;
|
bool IsRoutable() const;
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
bool IsMulticast() const;
|
|
||||||
enum Network GetNetwork() const;
|
enum Network GetNetwork() const;
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
std::string ToStringIP(bool fUseGetnameinfo = true) const;
|
std::string ToStringIP(bool fUseGetnameinfo = true) const;
|
||||||
|
@ -231,10 +231,10 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
|
|||||||
{
|
{
|
||||||
static const CScriptNum bnZero(0);
|
static const CScriptNum bnZero(0);
|
||||||
static const CScriptNum bnOne(1);
|
static const CScriptNum bnOne(1);
|
||||||
static const CScriptNum bnFalse(0);
|
// static const CScriptNum bnFalse(0);
|
||||||
static const CScriptNum bnTrue(1);
|
// static const CScriptNum bnTrue(1);
|
||||||
static const valtype vchFalse(0);
|
static const valtype vchFalse(0);
|
||||||
static const valtype vchZero(0);
|
// static const valtype vchZero(0);
|
||||||
static const valtype vchTrue(1, 1);
|
static const valtype vchTrue(1, 1);
|
||||||
|
|
||||||
CScript::const_iterator pc = script.begin();
|
CScript::const_iterator pc = script.begin();
|
||||||
|
@ -465,15 +465,6 @@ void CDBEnv::CloseDb(const std::string& strFile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDBEnv::RemoveDb(const std::string& strFile)
|
|
||||||
{
|
|
||||||
this->CloseDb(strFile);
|
|
||||||
|
|
||||||
LOCK(cs_db);
|
|
||||||
int rc = dbenv->dbremove(NULL, strFile.c_str(), NULL, DB_AUTO_COMMIT);
|
|
||||||
return (rc == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CDB::Rewrite(CWalletDBWrapper& dbw, const char* pszSkip)
|
bool CDB::Rewrite(CWalletDBWrapper& dbw, const char* pszSkip)
|
||||||
{
|
{
|
||||||
if (dbw.IsDummy()) {
|
if (dbw.IsDummy()) {
|
||||||
|
@ -72,7 +72,6 @@ public:
|
|||||||
void CheckpointLSN(const std::string& strFile);
|
void CheckpointLSN(const std::string& strFile);
|
||||||
|
|
||||||
void CloseDb(const std::string& strFile);
|
void CloseDb(const std::string& strFile);
|
||||||
bool RemoveDb(const std::string& strFile);
|
|
||||||
|
|
||||||
DbTxn* TxnBegin(int flags = DB_TXN_WRITE_NOSYNC)
|
DbTxn* TxnBegin(int flags = DB_TXN_WRITE_NOSYNC)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user