Skip to content

Commit

Permalink
Fix formatting of NOPs for generated script tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Apr 5, 2016
1 parent c7c6641 commit d03e466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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) + " ";
Expand All @@ -45,7 +45,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;
}
Expand Down

0 comments on commit d03e466

Please sign in to comment.