Several op's name are missed in the GetOpName(), add them back and sort in order.
Signed-off-by: Huang Le 4tarhl@gmail.com
Several op's name are missed in the GetOpName(), add them back and sort in order.
Signed-off-by: Huang Le 4tarhl@gmail.com
NAK. In my opinion, GetOpName should return "OP_UNKNOWN" for the template-matching pseudo-opcodes (they are not real opcodes).
Because GetOpName is used for human-readable decoding of Scripts, and if 0xf9 appears in a Script then it would be less confusing for it to appear as OP_UNKNOWN rather than OP_SMALLDATA.
Agree with Gavin.
The fact that we use pseudo opcodes for template matching is an implementation-specific hack.
@gavinandresen @sipa Got your point. The current code has already give op name for 3 of 5 template matching code (OP_PUBKEYHASH / OP_PUBKEY / OP_SMALLDATA) while leave the other 2 out (OP_PUBKEYS / OP_SMALLINTEGER), do we prefer to change all 5 to be OP_UNKNOWN in GetOpName() or just keep it the current way?
I'd suggest removing the three that are there now and replacing them with a comment:
// Note: OP_SMALLDATA/etc are not real opcodes. If they appear in real Script data, // let the default: switch case report them as OP_UNKNOWN.
Since they are not real opcodes, being reported as OP_UNKNOWN is less confusing for human-readable decoding.
Signed-off-by: Huang Le <4tarhl@gmail.com>
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/aab2c0fd7e7f629b20192ab9f05b281e5783cacc for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
ACK [updated^Wrewritten patch]
ACK