lnwallet+lnd: ensure curve parameters are set to avoid panics
This commit fixes a bug introduced by the past attempt to Make Logging Great Again. Since we unset the curve parameters when reading/writing the messages, if we have a lingering reference that’s active elsewhere in the daemon, then we’ll modify that reference. To fix this, we now explicitly set the Curve parameters in two areas. A similar commit has been pushed to lightning-onion.
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -1312,6 +1312,7 @@ func (lc *LightningChannel) ReceiveNewCommitment(rawSig []byte,
|
|||||||
|
|
||||||
// Ensure that the newly constructed commitment state has a valid
|
// Ensure that the newly constructed commitment state has a valid
|
||||||
// signature.
|
// signature.
|
||||||
|
theirMultiSigKey.Curve = btcec.S256()
|
||||||
sig, err := btcec.ParseSignature(rawSig, btcec.S256())
|
sig, err := btcec.ParseSignature(rawSig, btcec.S256())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ func newServer(listenAddrs []string, notifier chainntnfs.ChainNotifier,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
privKey.Curve = btcec.S256()
|
||||||
|
|
||||||
listeners := make([]net.Listener, len(listenAddrs))
|
listeners := make([]net.Listener, len(listenAddrs))
|
||||||
for i, addr := range listenAddrs {
|
for i, addr := range listenAddrs {
|
||||||
|
|||||||
Reference in new issue
Block a user