Browse Source
Remove unused Print/PrintHex functions
You can just use HexStr(script) or script.ToString() for debugging, no
need for these extra functions.
try
Wladimir J. van der Laan
11 years ago
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
3 changed files with
0 additions and
26 deletions
-
src/script.cpp
-
src/script.h
-
src/util.h
|
@ -838,10 +838,6 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co |
|
|
valtype& vchSig = stacktop(-2); |
|
|
valtype& vchSig = stacktop(-2); |
|
|
valtype& vchPubKey = stacktop(-1); |
|
|
valtype& vchPubKey = stacktop(-1); |
|
|
|
|
|
|
|
|
////// debug print
|
|
|
|
|
|
//PrintHex(vchSig.begin(), vchSig.end(), "sig: %s\n");
|
|
|
|
|
|
//PrintHex(vchPubKey.begin(), vchPubKey.end(), "pubkey: %s\n");
|
|
|
|
|
|
|
|
|
|
|
|
// Subset of script starting at the most recent codeseparator
|
|
|
// Subset of script starting at the most recent codeseparator
|
|
|
CScript scriptCode(pbegincodehash, pend); |
|
|
CScript scriptCode(pbegincodehash, pend); |
|
|
|
|
|
|
|
|
|
@ -691,12 +691,6 @@ public: |
|
|
void SetDestination(const CTxDestination& address); |
|
|
void SetDestination(const CTxDestination& address); |
|
|
void SetMultisig(int nRequired, const std::vector<CPubKey>& keys); |
|
|
void SetMultisig(int nRequired, const std::vector<CPubKey>& keys); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void PrintHex() const |
|
|
|
|
|
{ |
|
|
|
|
|
LogPrintf("CScript(%s)\n", HexStr(begin(), end(), true).c_str()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::string ToString() const |
|
|
std::string ToString() const |
|
|
{ |
|
|
{ |
|
|
std::string str; |
|
|
std::string str; |
|
@ -720,11 +714,6 @@ public: |
|
|
return str; |
|
|
return str; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void print() const |
|
|
|
|
|
{ |
|
|
|
|
|
LogPrintf("%s\n", ToString()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CScriptID GetID() const |
|
|
CScriptID GetID() const |
|
|
{ |
|
|
{ |
|
|
return CScriptID(Hash160(*this)); |
|
|
return CScriptID(Hash160(*this)); |
|
|
|
@ -286,17 +286,6 @@ inline std::string HexStr(const T& vch, bool fSpaces=false) |
|
|
return HexStr(vch.begin(), vch.end(), fSpaces); |
|
|
return HexStr(vch.begin(), vch.end(), fSpaces); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
template<typename T> |
|
|
|
|
|
void PrintHex(const T pbegin, const T pend, const char* pszFormat="%s", bool fSpaces=true) |
|
|
|
|
|
{ |
|
|
|
|
|
LogPrintf(pszFormat, HexStr(pbegin, pend, fSpaces).c_str()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline void PrintHex(const std::vector<unsigned char>& vch, const char* pszFormat="%s", bool fSpaces=true) |
|
|
|
|
|
{ |
|
|
|
|
|
LogPrintf(pszFormat, HexStr(vch, fSpaces).c_str()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline int64_t GetPerformanceCounter() |
|
|
inline int64_t GetPerformanceCounter() |
|
|
{ |
|
|
{ |
|
|
int64_t nCounter = 0; |
|
|
int64_t nCounter = 0; |
|
|