Skip to content

Commit

Permalink
Merge PIVX-Project#366: Do not stringify beyond OP_ZEROCOINSPEND for …
Browse files Browse the repository at this point in the history
…CScript::ToString()

1297a80 Do not stringify anything beyond OP_ZEROCOINSPEND for CScript::ToString() (presstab)

Tree-SHA512: 0350c767d19558c72100687c3376b54f8956af9b36ae78f8d35ff4cb4a31ade4c741b2c120a3052bd2d402209819c0377a5b80e3bdc56cf9e23f59e832e3cbf1
  • Loading branch information
presstab committed Nov 15, 2017
2 parents 58ec23f + 1297a80 commit f361344
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/script/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,16 @@ std::string CScript::ToString() const
str += "[error]";
return str;
}
if (0 <= opcode && opcode <= OP_PUSHDATA4)
if (0 <= opcode && opcode <= OP_PUSHDATA4) {
str += ValueString(vch);
else
} else {
str += GetOpName(opcode);
if (opcode == OP_ZEROCOINSPEND) {
//Zerocoinspend has no further op codes.
break;
}
}

}
return str;
}

0 comments on commit f361344

Please sign in to comment.