txbuilder: note consensus issue
This commit is contained in:
parent
ca4c9ca64c
commit
079d83d887
1 changed files with 2 additions and 6 deletions
|
@ -233,9 +233,7 @@ function prepareInput (input, ourPubKey, redeemScript, witnessValue, witnessScri
|
|||
}
|
||||
|
||||
let signScript = witnessScript
|
||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) {
|
||||
signScript = payments.p2pkh({ pubkey: expanded.pubkeys[0] }).output
|
||||
}
|
||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) throw new Error('P2SH(P2WSH(P2WPKH)) is a consensus failure')
|
||||
|
||||
return {
|
||||
redeemScript,
|
||||
|
@ -309,9 +307,7 @@ function prepareInput (input, ourPubKey, redeemScript, witnessValue, witnessScri
|
|||
}
|
||||
|
||||
let signScript = witnessScript
|
||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) {
|
||||
signScript = payments.p2pkh({ pubkey: expanded.pubkeys[0] }).output
|
||||
}
|
||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) throw new Error('P2WSH(P2WPKH) is a consensus failure')
|
||||
|
||||
return {
|
||||
witnessScript,
|
||||
|
|
Loading…
Reference in a new issue