aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-09-25 19:11:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-09-25 19:19:07 +0200
commit48efbdbe986355bd2478f0fdd366b20952fbf30a (patch)
treeb4581561aa9d51763bda985063d0ce4913cef19d /src/script/script.cpp
parent486270854ec0f89e798f2baff3fe01623a274ed4 (diff)
parentaf3208bfa6967d6b35aecf0ba35d9d6bf0f8317e (diff)
downloadbitcoin-48efbdbe986355bd2478f0fdd366b20952fbf30a.tar.xz
Merge pull request #5264
af3208b Resolve issue 3166. These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa. (mruddy)
Diffstat (limited to 'src/script/script.cpp')
-rw-r--r--src/script/script.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp
index fd33924732..58dbade0e2 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -8,16 +8,6 @@
#include "tinyformat.h"
#include "utilstrencodings.h"
-namespace {
-inline std::string ValueString(const std::vector<unsigned char>& vch)
-{
- if (vch.size() <= 4)
- return strprintf("%d", CScriptNum(vch, false).getint());
- else
- return HexStr(vch);
-}
-} // anon namespace
-
using namespace std;
const char* GetOpName(opcodetype opcode)
@@ -237,26 +227,3 @@ bool CScript::IsPushOnly() const
}
return true;
}
-
-std::string CScript::ToString() const
-{
- std::string str;
- opcodetype opcode;
- std::vector<unsigned char> vch;
- const_iterator pc = begin();
- while (pc < end())
- {
- if (!str.empty())
- str += " ";
- if (!GetOp(pc, opcode, vch))
- {
- str += "[error]";
- return str;
- }
- if (0 <= opcode && opcode <= OP_PUSHDATA4)
- str += ValueString(vch);
- else
- str += GetOpName(opcode);
- }
- return str;
-}