multi: fix go vet warnings throughout code base

This commit is contained in:
Olaoluwa Osuntokun committed 2017-02-16 19:33:19 +08:00
1 parent 55e693aa09
commit 384fe61e73
12 files changed
+52 -81

No files matched your search

-17
View File
@@ -7,7 +7,6 @@ import (
"github.com/go-errors/errors"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/chaincfg/chainhash"
)
var (
@@ -108,22 +107,6 @@ var _ Message = (*NodeAnnouncement)(nil)
func (a *NodeAnnouncement) Validate() error {
// TODO(roasbeef): move validation to discovery service
return nil
if err := a.Alias.Validate(); err != nil {
return err
}
data, err := a.DataToSign()
if err != nil {
return err
}
dataHash := chainhash.DoubleHashB(data)
if !a.Signature.Verify(dataHash, a.NodeID) {
return errors.New("can't check the node annoucement signature")
}
return nil
}
// Decode deserializes a serialized NodeAnnouncement stored in the