diff options
author | Huang Le <4tarhl@gmail.com> | 2014-05-31 01:23:53 +0800 |
---|---|---|
committer | Huang Le <4tarhl@gmail.com> | 2014-05-31 01:23:53 +0800 |
commit | aab2c0fd7e7f629b20192ab9f05b281e5783cacc (patch) | |
tree | ef21493e2ed5f1ca0f37e8d75988cc79084a27c6 /src/script.cpp | |
parent | 97ab93f50b6f35bc362990e9dd665b90ca4132df (diff) |
Remove template matching params from GetOpName()
Since they are not real opcodes, being reported as OP_UNKNOWN is less confusing for human-readable decoding.
Signed-off-by: Huang Le <4tarhl@gmail.com>
Diffstat (limited to 'src/script.cpp')
-rw-r--r-- | src/script.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/script.cpp b/src/script.cpp index ac6d4b316f..381e84d0b7 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -208,14 +208,13 @@ const char* GetOpName(opcodetype opcode) case OP_NOP9 : return "OP_NOP9"; case OP_NOP10 : return "OP_NOP10"; + case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE"; + // Note: + // The template matching params OP_SMALLDATA/etc are defined in opcodetype enum + // as kind of implementation hack, they are *NOT* real opcodes. If found in real + // Script, just let the default: case deal with them. - // template matching params - case OP_PUBKEYHASH : return "OP_PUBKEYHASH"; - case OP_PUBKEY : return "OP_PUBKEY"; - case OP_SMALLDATA : return "OP_SMALLDATA"; - - case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE"; default: return "OP_UNKNOWN"; } |