-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txscript: group reserved op code tests. #1355
Conversation
txscript/data/script_tests.json
Outdated
["0", "IF 0xfd ELSE 1 ENDIF", "NONE", "OK", "Reserved opcode 0xfd allowed if not executed"], | ||
["0", "IF 0xfe ELSE 1 ENDIF", "NONE", "OK", "Reserved opcode 0xfe allowed if not executed"], | ||
["0", "IF 0xff ELSE 1 ENDIF", "NONE", "OK", "Reserved opcode 0xff allowed if not executed"], | ||
["RESERVED opcode tests"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems misplaced.
txscript/data/script_tests.json
Outdated
["NOP", "BLAKE256 1", "NONE", "ERR_INVALID_STACK_OPERATION"], | ||
["NOP", "HASH160 1", "NONE", "ERR_INVALID_STACK_OPERATION"], | ||
["NOP", "HASH256 1", "NONE", "ERR_INVALID_STACK_OPERATION"], | ||
["0x00", "SIZE 0 EQUAL", "NONE", "OK", "Basic OP_0 execution"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be up under the Tests for test harness itself
section.
txscript/data/script_tests.json
Outdated
["NOP", "HASH160 1", "NONE", "ERR_INVALID_STACK_OPERATION"], | ||
["NOP", "HASH256 1", "NONE", "ERR_INVALID_STACK_OPERATION"], | ||
["0x00", "SIZE 0 EQUAL", "NONE", "OK", "Basic OP_0 execution"], | ||
["0x00", "'00' EQUAL", "NONE", "ERR_EVAL_FALSE", "Basic OP_0 execution"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the EQUAL test coverage
section.
txscript/data/script_tests.json
Outdated
|
||
["NOP1","NOP10", "NONE", "ERR_EMPTY_STACK"], | ||
["1", "0x02 0x0100 EQUAL NOT", "NONE", "OK", "Not the same byte array..."], | ||
["0", "0x01 0x80 EQUAL NOT", "NONE", "OK"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the EQUAL test coverage
section.
txscript/data/script_tests.json
Outdated
|
||
["NOP1","NOP10", "NONE", "ERR_EMPTY_STACK"], | ||
["1", "0x02 0x0100 EQUAL NOT", "NONE", "OK", "Not the same byte array..."], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the EQUAL test coverage
section.
txscript/data/script_tests.json
Outdated
["NOP", "0 'a'{2048} <'b'{2048}>{6} 'b'{2024}", "NONE", "ERR_SCRIPT_SIZE", "16385-byte scriptPubKey"], | ||
["1 IF 1 ELSE", "0xff ENDIF", "NONE", "ERR_UNBALANCED_CONDITIONAL", "Invalid because scriptSig and scriptPubKey are processed separately"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the IF test coverage
section
txscript/data/script_tests.json
Outdated
["1 0x01 NOP10", "HASH160 0x14 0xa880c3383e77efb97808a87ca378539e5f8904ef EQUAL", "DISCOURAGE_UPGRADABLE_NOPS", "ERR_DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in redeemScript"], | ||
["1", "NOP", "DISCOURAGE_UPGRADABLE_NOPS", "OK", "Discourage NOPx flag allows OP_NOP"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the NOP test coverage
section.
93beed8
to
7545adb
Compare
this groups reserved op codes and moves some dangling tests to their respective groups.
build: tidy go modules
This is work towards #1331