lnwallet: reverse order of signatures when spending the funding output
This commit is a follow up to the prior commit, as since we reversed the order of the pubkeys in the multi-sig scripts, then we also need to reverse the order of the signatures that we use when attempting to spend the funding output directly.
This commit is contained in:
parent
eb2c8ba653
commit
67aa519480
@ -121,7 +121,7 @@ func SpendMultiSig(witnessScript, pubA, sigA, pubB, sigB []byte) [][]byte {
|
|||||||
// public keys in descending order. So we do a quick comparison in order
|
// public keys in descending order. So we do a quick comparison in order
|
||||||
// ensure the signatures appear on the Script Virtual Machine stack in
|
// ensure the signatures appear on the Script Virtual Machine stack in
|
||||||
// the correct order.
|
// the correct order.
|
||||||
if bytes.Compare(pubA, pubB) == -1 {
|
if bytes.Compare(pubA, pubB) == 1 {
|
||||||
witness[1] = sigB
|
witness[1] = sigB
|
||||||
witness[2] = sigA
|
witness[2] = sigA
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user