Skip to content

Conversation

@Christewart
Copy link
Contributor

The happy path for a p2sh script with redeem script type p2pkh was previously untested, adding a test case for this inside of script_tests.json

@paveljanik
Copy link
Contributor

Please squash into one commit (see 90963e5#diff-6a3371457528722a734f3c51d9238c13R46).

@Christewart Christewart force-pushed the add_p2sh_p2pkh_script_test branch from 987d378 to 32833a4 Compare May 24, 2016 12:54
@Christewart
Copy link
Contributor Author

Not sure why Travis CI failed on this build - I don't know Travis CI that well but it looks like it is unrelated to my change?

@sdaftuar
Copy link
Member

Agree that the failure looks unrelated. But yikes, that looks like a somewhat scary error that was stumbled upon, will investigate...

@paveljanik
Copy link
Contributor

ACK 32833a4

Travis failure is indeed unrelated.

@Christewart
Copy link
Contributor Author

@paveljanik @sdaftuar Is there a way to restart this travis build?

@paveljanik
Copy link
Contributor

Lokks like it is already done - all checks have passed.

@sipa
Copy link
Member

sipa commented May 25, 2016

@Christewart Please don't add manually created test cases inside the "automically generated test cases" block, as that block gets overwritten.

Ideally, add this as an automatically generated test here: https://github.com/bitcoin/bitcoin/blob/v0.12.1/src/test/script_tests.cpp#L353

@Christewart Christewart force-pushed the add_p2sh_p2pkh_script_test branch from 2ed49f5 to 266f60a Compare May 27, 2016 17:11
Copy link
Member

Choose a reason for hiding this comment

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

This should not be changed

@laanwj
Copy link
Member

laanwj commented May 30, 2016

Sorry for this taking so long, just moving the test case would have been fine, but now that you change script_tests.cpp you need to make sure it doesn't generate the new json every time.

Fixing formatting

Adding test case into automatically generated test case set

Clean up commits

removing extra whitespace from eol

Removing extra whitespace on macro line
@Christewart Christewart force-pushed the add_p2sh_p2pkh_script_test branch from 266f60a to b682960 Compare May 30, 2016 13:53
@Christewart
Copy link
Contributor Author

@laanwj Should be fixed - I always seem to add unnecessary spaces/new lines without realizing it in my commits :-)

@sipa
Copy link
Member

sipa commented May 30, 2016

utACK b682960

"P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true
).PushSig(keys.key0).PushRedeem().DamagePush(10).ScriptError(SCRIPT_ERR_EVAL_FALSE));


Copy link
Contributor

Choose a reason for hiding this comment

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

Pure cosmetic nit: you have added tab here.

Copy link
Member

Choose a reason for hiding this comment

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

Nit^2: I think it's not a tab but four spaces 🐌

@paveljanik
Copy link
Contributor

utACK b682960

@laanwj laanwj merged commit b682960 into bitcoin:master May 31, 2016
laanwj added a commit that referenced this pull request May 31, 2016
b682960 Adding P2SH(p2pkh) script test case (Chris Stewart)
@laanwj
Copy link
Member

laanwj commented May 31, 2016

Not going to hold this up on a cosmetic nit.

codablock pushed a commit to codablock/dash that referenced this pull request Dec 22, 2017
b682960 Adding P2SH(p2pkh) script test case (Chris Stewart)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
b682960 Adding P2SH(p2pkh) script test case (Chris Stewart)
@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.

6 participants