discovery: print proper error message when sigs fail to validate
This commit is contained in:
parent
6e3abdfd14
commit
d0b192c636
@ -1,6 +1,7 @@
|
|||||||
package discovery
|
package discovery
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
"github.com/roasbeef/btcd/btcec"
|
"github.com/roasbeef/btcd/btcec"
|
||||||
@ -81,8 +82,8 @@ func (d *AuthenticatedGossiper) validateChannelUpdateAnn(pubKey *btcec.PublicKey
|
|||||||
dataHash := chainhash.DoubleHashB(data)
|
dataHash := chainhash.DoubleHashB(data)
|
||||||
|
|
||||||
if !a.Signature.Verify(dataHash, copyPubKey(pubKey)) {
|
if !a.Signature.Verify(dataHash, copyPubKey(pubKey)) {
|
||||||
return errors.Errorf("verification of channel updates "+
|
return errors.Errorf("invalid signature for channel "+
|
||||||
"failed chan_id=%v", a.ShortChannelID.ToUint64())
|
"update %v", spew.Sdump(a))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user