Skip to content

Conversation

@junderw
Copy link
Member

@junderw junderw commented Aug 23, 2019

Also fixes a bug.

One fixture for finalizeAllInputs only had a finalScriptSig when it should have also had a finalWitnessScript...

strangely, we test the same script in the integration tests, but the integration tests passed.... ????

This fails currently, and needs a bip174 fix upstream to allow for this.

@junderw
Copy link
Member Author

junderw commented Aug 23, 2019

Also, the reason why we should allow this is that segwit needs less info, but nonWitnessUtxo has more info, so why reject it when we can sign it?

This way wallet apps could decide to code it so that all inputs have nonWitnessUtxo just in case... or if they don't know what the redeemscript of a P2SH prevoutScript is they can just err on the side of caution and stick the nonWitnessUtxo in it.

@junderw junderw changed the title WIP: Allow nonWitnessUtxo with segwit [PSBT] Allow nonWitnessUtxo with segwit Aug 23, 2019
@d-yokoi d-yokoi merged commit d02ee01 into master Aug 23, 2019
@d-yokoi d-yokoi deleted the allowNonForSegwit branch August 23, 2019 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants