Skip to content
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: add stake opcode tests. #1383

Merged
merged 2 commits into from
Sep 11, 2018
Merged

txscript: add stake opcode tests. #1383

merged 2 commits into from
Sep 11, 2018

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Aug 5, 2018

This is work towards #1331.


["SSTX related tests"],
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"],
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX false eval"],
Copy link
Member

@davecgh davecgh Aug 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest SSTX almost P2SH for the comment since it's a bit more descriptive. Likewise for the others.

@dnldd dnldd closed this Aug 7, 2018
@dnldd dnldd reopened this Aug 7, 2018
@davecgh davecgh added this to the 1.4.0 milestone Aug 8, 2018
["SSTX related tests"],
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"],
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX almost P2SH"],
["DATA_5 1 3 DATA_2 ADD SSTX", "HASH160 DATA_20 0x30c7ecf9ff5508c105071194d979b13ed90a82b7 EQUAL", "NONE", "OK", "SSTX (P2SH)"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with #1381, these aren't all actually testing the intended thing, rather they're just pushing data to the stack.

["SSTX related tests"],
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"],
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX almost P2SH"],
["1 3 DATA_2 ADD SSTX", "HASH160 DATA_20 0xdcbd287f8a23bf97cea3c77392854976a6feff8f EQUAL", "NONE", "ERR_P2SH_STAKE_OPCODES", "SSTX (P2SH)"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should call out the SSTX is invalid in a p2sh script. Same with others.

@davecgh davecgh merged commit 60cbb70 into decred:master Sep 11, 2018
vctt94 pushed a commit to vctt94/dcrd that referenced this pull request Mar 29, 2019
addrmgr: store address' supported service bits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants