discovery: error string lint fixes

discovery: lint fix to remove append loop
This commit is contained in:
Lars Lehtonen 2019-09-25 18:42:38 +00:00
parent 58c23074d1
commit 0cae1e69ab
2 changed files with 4 additions and 6 deletions

@ -350,7 +350,7 @@ func (d *DNSSeedBootstrapper) fallBackSRVLookup(soaShim string,
// If the message response code was not the success code, fail.
if resp.Rcode != dns.RcodeSuccess {
return nil, fmt.Errorf("Unsuccessful SRV request, "+
return nil, fmt.Errorf("unsuccessful SRV request, "+
"received: %v", resp.Rcode)
}

@ -1624,7 +1624,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
// We'll ignore any channel announcements that target any chain
// other than the set of chains we know of.
if !bytes.Equal(msg.ChainHash[:], d.cfg.ChainHash[:]) {
err := fmt.Errorf("Ignoring ChannelAnnouncement from "+
err := fmt.Errorf("ignoring ChannelAnnouncement from "+
"chain=%v, gossiper on chain=%v", msg.ChainHash,
d.cfg.ChainHash)
log.Errorf(err.Error())
@ -1785,9 +1785,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
var channelUpdates []*networkMsg
d.pChanUpdMtx.Lock()
for _, cu := range d.prematureChannelUpdates[shortChanID] {
channelUpdates = append(channelUpdates, cu)
}
channelUpdates = append(channelUpdates, d.prematureChannelUpdates[shortChanID]...)
// Now delete the premature ChannelUpdates, since we added them
// all to the queue of network messages.
@ -1850,7 +1848,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
// We'll ignore any channel announcements that target any chain
// other than the set of chains we know of.
if !bytes.Equal(msg.ChainHash[:], d.cfg.ChainHash[:]) {
err := fmt.Errorf("Ignoring ChannelUpdate from "+
err := fmt.Errorf("ignoring ChannelUpdate from "+
"chain=%v, gossiper on chain=%v", msg.ChainHash,
d.cfg.ChainHash)
log.Errorf(err.Error())