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

add unit tests for the decodescript rpc #6350

Merged
merged 1 commit into from
Jul 2, 2015

Conversation

mruddy
Copy link
Contributor

@mruddy mruddy commented Jun 28, 2015

Adding unit tests for the "decodescript" RPC because:

  1. I didn't see any tests specifically for the "decodescript" RPC.
  2. In adding these, I added a case that will fail until fixed if/when the OP_NOP2 name decode changes to OP_CHECKLOCKTIMEVERIFY are made. Basically a minor follow-up to Mempool only CHECKLOCKTIMEVERIFY (BIP65) verification, unparameterized version #6124 (comment).
  3. These will be good to have if/when I get back around to show scriptSig signature hash types in transaction decodes. fixes #3166 #5264 and Remove the "OP_" prefix from transaction script decodes. #5392.

@jgarzik
Copy link
Contributor

jgarzik commented Jun 28, 2015

ut ACK

@laanwj laanwj added the Tests label Jun 29, 2015
@laanwj
Copy link
Member

laanwj commented Jun 29, 2015

Concept ACK. Thanks for adding tests.

However, wouldn't these be more appropriate in src/qa/rpc-tests/rawtransactions.py?

I suppose it doesn't make much of a difference as this is a stateless utility function.

@mruddy
Copy link
Contributor Author

mruddy commented Jun 29, 2015

@laanwj Thanks for the feedback. Yes, I suppose it would make sense to move these over into the python tests. They are more integration level tests anyways. I just did them this way because I had some other changes and could run everything with a single "make check". I'll look at moving these over later today or tomorrow.

… tests to the testing seciton of the main readme.
@mruddy
Copy link
Contributor Author

mruddy commented Jun 30, 2015

@laanwj Updated -- I decided to use a separate new decodescript.py file to avoid muddling the existing rawtransactions.py. I also added a short snippet to the main README referencing this set of RPC tests.

@laanwj
Copy link
Member

laanwj commented Jul 2, 2015

ACK

@laanwj laanwj merged commit 70ae43e into bitcoin:master Jul 2, 2015
laanwj added a commit that referenced this pull request Jul 2, 2015
70ae43e add tests for the decodescript rpc. add mention of the rpc regression tests to the testing seciton of the main readme. (mruddy)
@mruddy mruddy deleted the raw-decode-unit-tests branch July 2, 2015 12:14
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants