Skip to content

Commit 6dd5edb

Browse files
committed
Remove unused Print/PrintHex functions
You can just use HexStr(script) or script.ToString() for debugging, no need for these extra functions.
1 parent 588fb4e commit 6dd5edb

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

src/script.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,10 +838,6 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
838838
valtype& vchSig = stacktop(-2);
839839
valtype& vchPubKey = stacktop(-1);
840840

841-
////// debug print
842-
//PrintHex(vchSig.begin(), vchSig.end(), "sig: %s\n");
843-
//PrintHex(vchPubKey.begin(), vchPubKey.end(), "pubkey: %s\n");
844-
845841
// Subset of script starting at the most recent codeseparator
846842
CScript scriptCode(pbegincodehash, pend);
847843

src/script.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -691,12 +691,6 @@ class CScript : public std::vector<unsigned char>
691691
void SetDestination(const CTxDestination& address);
692692
void SetMultisig(int nRequired, const std::vector<CPubKey>& keys);
693693

694-
695-
void PrintHex() const
696-
{
697-
LogPrintf("CScript(%s)\n", HexStr(begin(), end(), true).c_str());
698-
}
699-
700694
std::string ToString() const
701695
{
702696
std::string str;
@@ -720,11 +714,6 @@ class CScript : public std::vector<unsigned char>
720714
return str;
721715
}
722716

723-
void print() const
724-
{
725-
LogPrintf("%s\n", ToString());
726-
}
727-
728717
CScriptID GetID() const
729718
{
730719
return CScriptID(Hash160(*this));

src/util.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,6 @@ inline std::string HexStr(const T& vch, bool fSpaces=false)
286286
return HexStr(vch.begin(), vch.end(), fSpaces);
287287
}
288288

289-
template<typename T>
290-
void PrintHex(const T pbegin, const T pend, const char* pszFormat="%s", bool fSpaces=true)
291-
{
292-
LogPrintf(pszFormat, HexStr(pbegin, pend, fSpaces).c_str());
293-
}
294-
295-
inline void PrintHex(const std::vector<unsigned char>& vch, const char* pszFormat="%s", bool fSpaces=true)
296-
{
297-
LogPrintf(pszFormat, HexStr(vch, fSpaces).c_str());
298-
}
299-
300289
inline int64_t GetPerformanceCounter()
301290
{
302291
int64_t nCounter = 0;

0 commit comments

Comments
 (0)