Fix error in scriptPubKey field in BIP 143 example#652
Fix error in scriptPubKey field in BIP 143 example#652Sword-Smith wants to merge 1 commit intobitcoin:masterfrom
Conversation
It seems that a scriptPubKey used when signing a transaction was wrong.
|
@Sword-Smith Do you have some code that you use to test this? |
I do not at the moment. But it is obvious, no? You are using BIP143 which is only used when spending segwit inputs. Agreed? So the scriptCode of the input I am spending must be of form P2WPKH or P2WSH in order for BIP143 to be used. Agreed? The field in question is field 5: So we are signing a scriptPubKey of something sent to a segwit address. That output must be of the form 0014 (P2WPKH) or 0020 (P2WSH). Or am I missing something? |
|
This is incorrect. The |
It seems that a scriptPubKey used when signing a transaction was wrong.