-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[qa] Fix rare failure in p2p-segwit.py #12133
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
Conversation
tx.wit.vtxinwit.append(CTxInWitness()) | ||
sign_P2PK_witness_input(witness_program, tx, index, SIGHASH_SINGLE|SIGHASH_ANYONECANPAY, i.nValue, key) | ||
sign_P2PK_witness_input(witness_program, tx, index, SIGHASH_ALL|SIGHASH_ANYONECANPAY, i.nValue, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It felt wrong to use SIGHASH_SINGLE with an out-of-bounds index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok then comment could use an update a few lines up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Thanks, will fix.
7fe5b20
to
d18c310
Compare
Avoid creating very small utxos that would violate an assumption in test_non_standard_witness.
d18c310
to
35c2b1f
Compare
Tested ACk 35c2b1f |
Thanks! utACK 35c2b1f. Created a similar fix last year, but somehow forgot to submit it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 35c2b1f. Change makes sense, but I couldn't figure out what problem the previous outputs caused in test_non_standard_witness.
In |
Yes the PR comment makes it sound like it's a non-standard witness, rather than non-standard output. |
utACK 35c2b1f |
35c2b1f Fix rare failure in p2p-segwit.py (Suhas Daftuar) Pull request description: Avoid creating very small utxos that would violate an assumption in test_non_standard_witness. Fixes #11953 Tree-SHA512: 5fb7ae68f8731df819bab365923a84568b57227e4112f711fc2574767d15be83acd3e99d0d5bac94a42411a958b13a2119468babefed14efcfdda180004d4166
Avoid creating very small utxos that would violate an assumption in
test_non_standard_witness.
Fixes #11953