add unit tests for the decodescript rpc #6350

Merged
merged 1 commit into from Jul 2, 2015

Conversation

Projects
None yet
3 participants
@mruddy
Contributor

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 #6124 (comment).
  3. These will be good to have if/when I get back around to #5264 and #5392.
@jgarzik

This comment has been minimized.

Show comment
Hide comment
@jgarzik

jgarzik Jun 28, 2015

Contributor

ut ACK

Contributor

jgarzik commented Jun 28, 2015

ut ACK

@laanwj laanwj added the Tests label Jun 29, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 29, 2015

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@mruddy

mruddy Jun 29, 2015

Contributor

@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.

Contributor

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.

add tests for the decodescript rpc. add mention of the rpc regression…
… tests to the testing seciton of the main readme.
@mruddy

This comment has been minimized.

Show comment
Hide comment
@mruddy

mruddy Jun 30, 2015

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jul 2, 2015

Member

ACK

Member

laanwj commented Jul 2, 2015

ACK

@laanwj laanwj merged commit 70ae43e into bitcoin:master Jul 2, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jul 2, 2015

Merge pull request #6350
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 mruddy:raw-decode-unit-tests branch Jul 2, 2015

@str4d str4d referenced this pull request in zcash/zcash Feb 14, 2017

Merged

Bitcoin 0.12 RPC PRs 1 #2100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment