Fix formatting of NOPs for generated script tests

(cherry picked from commit d03e46625ac95954bb9ecbc2cf73ffd8de6b8a13)
This commit is contained in:
Pieter Wuille 2016-04-05 14:26:01 +02:00 committed by Jack Grigg
parent 9494acdb60
commit 5064a933a0
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ string FormatScript(const CScript& script)
} else if ((op >= OP_1 && op <= OP_16) || op == OP_1NEGATE) {
ret += strprintf("%i ", op - OP_1NEGATE - 1);
continue;
} else if (op >= OP_NOP && op <= OP_CHECKMULTISIGVERIFY) {
} else if (op >= OP_NOP && op <= OP_NOP10) {
string str(GetOpName(op));
if (str.substr(0, 3) == string("OP_")) {
ret += str.substr(3, string::npos) + " ";
@ -44,7 +44,7 @@ string FormatScript(const CScript& script)
if (vch.size() > 0) {
ret += strprintf("0x%x 0x%x ", HexStr(it2, it - vch.size()), HexStr(it - vch.size(), it));
} else {
ret += strprintf("0x%x", HexStr(it2, it));
ret += strprintf("0x%x ", HexStr(it2, it));
}
continue;
}