lnwallet: reverse the order of the pubkeys in the funding output
When creating the script for the funding output, we were reversing the order of the public keys due to an incorrect assertion of the return value of the bytes.Compare function. To fix this, we now flip the order, allowing us to properly create channels as specified within the specification.
This commit is contained in:
parent
5359476936
commit
eb2c8ba653
@ -70,7 +70,7 @@ func genMultiSigScript(aPub, bPub []byte) ([]byte, error) {
|
||||
// order. The signatures within the scriptSig must also adhere to the
|
||||
// order, ensuring that the signatures for each public key appears in
|
||||
// the proper order on the stack.
|
||||
if bytes.Compare(aPub, bPub) == -1 {
|
||||
if bytes.Compare(aPub, bPub) == 1 {
|
||||
aPub, bPub = bPub, aPub
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user