diff options
| author | Gavin Andresen <[email protected]> | 2013-08-25 18:17:59 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-08-25 18:17:59 -0700 |
| commit | b62dc051aa44ee73e24b49dd9337de2434b89710 (patch) | |
| tree | f51a036053413d57e3a2e33e96b00d10cdff6a2f /src/test/script_tests.cpp | |
| parent | Merge pull request #2935 from sipa/obounds (diff) | |
| parent | Document and test OP_RESERVED weirdness (diff) | |
| download | discoin-b62dc051aa44ee73e24b49dd9337de2434b89710.tar.xz discoin-b62dc051aa44ee73e24b49dd9337de2434b89710.zip | |
Merge pull request #2938 from petertodd/op-reserved-weirdness
Document and test OP_RESERVED weirdness
Diffstat (limited to 'src/test/script_tests.cpp')
| -rw-r--r-- | src/test/script_tests.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index e7ad52627..c1f6f178d 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -32,8 +32,12 @@ ParseScript(string s) if (mapOpNames.size() == 0) { - for (int op = OP_NOP; op <= OP_NOP10; op++) + for (int op = 0; op <= OP_NOP10; op++) { + // Allow OP_RESERVED to get into mapOpNames + if (op < OP_NOP && op != OP_RESERVED) + continue; + const char* name = GetOpName((opcodetype)op); if (strcmp(name, "OP_UNKNOWN") == 0) continue; @@ -72,7 +76,7 @@ ParseScript(string s) } else if (mapOpNames.count(w)) { - // opcode, e.g. OP_ADD or OP_1: + // opcode, e.g. OP_ADD or ADD: result << mapOpNames[w]; } else |