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

tests: Fix bitcoin-tx signing test case #6390

Merged
merged 1 commit into from Jul 8, 2015

Conversation

@laanwj
Copy link
Member

laanwj commented Jul 7, 2015

Fixes wrong scriptPubkey problem in #6389, causing the transaction to not actually be signed.

Also change bitcoin-tx so that in MutateTxSign if SignSignature fails, signing is marked as incomplete. This makes sure that errors in e.g. scriptPubKeys are detected.

@laanwj laanwj added the Tests label Jul 7, 2015
Fixes wrong scriptPubkey problem, which caused the transaction to
not actually be signed.
@laanwj laanwj force-pushed the laanwj:2015_07_fix_bitcointx_test branch Jul 7, 2015
@jgarzik
Copy link
Contributor

jgarzik commented Jul 7, 2015

ACK, with comments:

  • bitcoin-tx notably does nothing with fComplete.
  • a "exit(1) if not completely signed" command line switch would enable tests to notice this sort of failure
@laanwj
Copy link
Member Author

laanwj commented Jul 7, 2015

Yes, thinking of it, the change to bitcoin-tx is redundant, even if fComplete was somehow reported.

The VerifyScript later in the iteration will already set fComplete to false if the signing was not successful.

Will remove it.

@laanwj laanwj force-pushed the laanwj:2015_07_fix_bitcointx_test branch to 133601f Jul 8, 2015
@laanwj laanwj merged commit 133601f into bitcoin:master Jul 8, 2015
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
laanwj added a commit that referenced this pull request Jul 8, 2015
133601f tests: Fix bitcoin-tx signing testcase (Wladimir J. van der Laan)
@paveljanik

This comment has been minimized.

Copy link

paveljanik commented on 133601f Jul 8, 2015

Post merge ACK, thanks!

Looks like this is the only example and usage of sign in bitcoin-tx. I'll try to come up with more test cases, more inputs etc. It is not as straightforward as createrawtransaction/signrawtransaction and the syntax doesn't help at all. The same applies to doc ("see signrawtransaction").

zkbot added a commit to zcash/zcash that referenced this pull request Feb 15, 2017
zkbot added a commit to zcash/zcash that referenced this pull request Feb 20, 2017
zkbot added a commit to zcash/zcash that referenced this pull request Mar 3, 2017
Bitcoin 0.12 test PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6337
- bitcoin/bitcoin#6390
- bitcoin/bitcoin#5515
- bitcoin/bitcoin#6287 (partial, remainder included in bitcoin/bitcoin#6703)
- bitcoin/bitcoin#6465

Part of #2074.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.