Skip to content

Commit 8b88936

Browse files
sipafurszy
authored andcommitted
Fix formatting of NOPs for generated script tests
1 parent 587aef8 commit 8b88936

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core_write.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ std::string FormatScript(const CScript& script)
3232
} else if ((op >= OP_1 && op <= OP_16) || op == OP_1NEGATE) {
3333
ret += strprintf("%i ", op - OP_1NEGATE - 1);
3434
continue;
35-
} else if (op >= OP_NOP && op <= OP_CHECKMULTISIGVERIFY) {
35+
} else if (op >= OP_NOP && op <= OP_NOP10) {
3636
std::string str(GetOpName(op));
3737
if (str.substr(0, 3) == std::string("OP_")) {
3838
ret += str.substr(3, std::string::npos) + " ";
@@ -43,7 +43,7 @@ std::string FormatScript(const CScript& script)
4343
ret += strprintf("0x%x 0x%x ", HexStr(std::vector<uint8_t>(it2, it - vch.size())),
4444
HexStr(std::vector<uint8_t>(it - vch.size(), it)));
4545
} else {
46-
ret += strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, it)));
46+
ret += strprintf("0x%x", HexStr(std::vector<uint8_t>(it2, it)));
4747
}
4848
continue;
4949
}

0 commit comments

Comments
 (0)