mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
lnwallet: sort sig jobs before submission
This commit is contained in:
parent
a0baa8fb41
commit
48567e8944
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package lnwallet
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"cmp"
|
||||
"crypto/sha256"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
@ -3996,10 +3997,10 @@ func (lc *LightningChannel) SignNextCommitment() (*NewCommitState, error) {
|
|||
// order as they appear on the commitment transaction after BIP 69
|
||||
// sorting.
|
||||
slices.SortFunc(sigBatch, func(i, j SignJob) int {
|
||||
return int(i.OutputIndex - j.OutputIndex)
|
||||
return cmp.Compare(i.OutputIndex, j.OutputIndex)
|
||||
})
|
||||
slices.SortFunc(auxSigBatch, func(i, j AuxSigJob) int {
|
||||
return int(i.OutputIndex - j.OutputIndex)
|
||||
return cmp.Compare(i.OutputIndex, j.OutputIndex)
|
||||
})
|
||||
|
||||
lc.sigPool.SubmitSignBatch(sigBatch)
|
||||
|
|
Loading…
Add table
Reference in a new issue