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
|
let signScript = witnessScript
|
||||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) {
|
if (expanded.type === SCRIPT_TYPES.P2WPKH) throw new Error('P2SH(P2WSH(P2WPKH)) is a consensus failure')
|
||||||
signScript = payments.p2pkh({ pubkey: expanded.pubkeys[0] }).output
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
redeemScript,
|
redeemScript,
|
||||||
|
@ -309,9 +307,7 @@ function prepareInput (input, ourPubKey, redeemScript, witnessValue, witnessScri
|
||||||
}
|
}
|
||||||
|
|
||||||
let signScript = witnessScript
|
let signScript = witnessScript
|
||||||
if (expanded.type === SCRIPT_TYPES.P2WPKH) {
|
if (expanded.type === SCRIPT_TYPES.P2WPKH) throw new Error('P2WSH(P2WPKH) is a consensus failure')
|
||||||
signScript = payments.p2pkh({ pubkey: expanded.pubkeys[0] }).output
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
witnessScript,
|
witnessScript,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue