Skip to content

Commit

Permalink
Remove unused C++ code not covered by unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Jun 2, 2021
1 parent 60bb4da commit 7d977ac
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions src/netaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,6 @@ bool CNetAddr::IsLocal() const
return false;
}

bool CNetAddr::IsMulticast() const
{
return (IsIPv4() && (GetByte(3) & 0xF0) == 0xE0)
|| (GetByte(15) == 0xFF);
}

bool CNetAddr::IsValid() const
{
// Cleanup 3-byte shifted addresses caused by garbage in size field
Expand Down
1 change: 0 additions & 1 deletion src/netaddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class CNetAddr
bool IsLocal() const;
bool IsRoutable() const;
bool IsValid() const;
bool IsMulticast() const;
enum Network GetNetwork() const;
std::string ToString() const;
std::string ToStringIP() const;
Expand Down
3 changes: 0 additions & 3 deletions src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
{
static const CScriptNum bnZero(0);
static const CScriptNum bnOne(1);
static const CScriptNum bnFalse(0);
static const CScriptNum bnTrue(1);
static const valtype vchFalse(0);
static const valtype vchZero(0);
static const valtype vchTrue(1, 1);

CScript::const_iterator pc = script.begin();
Expand Down
9 changes: 0 additions & 9 deletions src/wallet/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,15 +466,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)
{
if (dbw.IsDummy()) {
Expand Down
1 change: 0 additions & 1 deletion src/wallet/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class CDBEnv
void CheckpointLSN(const std::string& strFile);

void CloseDb(const std::string& strFile);
bool RemoveDb(const std::string& strFile);

DbTxn* TxnBegin(int flags = DB_TXN_WRITE_NOSYNC)
{
Expand Down

0 comments on commit 7d977ac

Please sign in to comment.