From d0b192c63629a1a9c098123a7bc0333f647f620e Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 23 Aug 2017 11:30:50 -0700 Subject: [PATCH] discovery: print proper error message when sigs fail to validate --- discovery/validation.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/discovery/validation.go b/discovery/validation.go index a796960f..121aedd0 100644 --- a/discovery/validation.go +++ b/discovery/validation.go @@ -1,6 +1,7 @@ package discovery import ( + "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/lnwire" "github.com/roasbeef/btcd/btcec" @@ -81,8 +82,8 @@ func (d *AuthenticatedGossiper) validateChannelUpdateAnn(pubKey *btcec.PublicKey dataHash := chainhash.DoubleHashB(data) if !a.Signature.Verify(dataHash, copyPubKey(pubKey)) { - return errors.Errorf("verification of channel updates "+ - "failed chan_id=%v", a.ShortChannelID.ToUint64()) + return errors.Errorf("invalid signature for channel "+ + "update %v", spew.Sdump(a)) } return nil