multi: formatting and comment fixes
This commit is contained in:
160 files changed
+159
-260
No files matched your search
@@ -308,6 +308,7 @@ var _ NetworkPeerBootstrapper = (*ChannelGraphBootstrapper)(nil)
|
||||
func NewDNSSeedBootstrapper(
|
||||
seeds [][2]string, net tor.Net,
|
||||
timeout time.Duration) NetworkPeerBootstrapper {
|
||||
|
||||
return &DNSSeedBootstrapper{dnsSeeds: seeds, net: net, timeout: timeout}
|
||||
}
|
||||
|
||||
|
||||
@@ -1178,6 +1178,7 @@ func (d *AuthenticatedGossiper) networkHandler() {
|
||||
announcement.msg,
|
||||
sourceToPub(announcement.source),
|
||||
) {
|
||||
|
||||
announcement.err <- fmt.Errorf("recently " +
|
||||
"rejected")
|
||||
continue
|
||||
@@ -1205,6 +1206,7 @@ func (d *AuthenticatedGossiper) networkHandler() {
|
||||
routing.ErrVBarrierShuttingDown,
|
||||
routing.ErrParentValidationFailed,
|
||||
) {
|
||||
|
||||
log.Warnf("unexpected error "+
|
||||
"during validation "+
|
||||
"barrier shutdown: %v",
|
||||
@@ -1787,6 +1789,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
||||
routing.ErrIgnored,
|
||||
routing.ErrVBarrierShuttingDown,
|
||||
) {
|
||||
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
@@ -2314,8 +2317,8 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
||||
routing.ErrIgnored,
|
||||
routing.ErrVBarrierShuttingDown,
|
||||
) {
|
||||
log.Debug(err)
|
||||
|
||||
log.Debug(err)
|
||||
} else {
|
||||
key := newRejectCacheKey(
|
||||
msg.ShortChannelID.ToUint64(),
|
||||
@@ -2929,6 +2932,7 @@ func IsKeepAliveUpdate(update *lnwire.ChannelUpdate,
|
||||
// Both updates should be from the same direction.
|
||||
if update.ChannelFlags&lnwire.ChanUpdateDirection !=
|
||||
prev.ChannelFlags&lnwire.ChanUpdateDirection {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -2893,6 +2893,7 @@ func TestRetransmit(t *testing.T) {
|
||||
|
||||
if chanAnn != chanAnns || chanUpd != chanUpds ||
|
||||
nodeAnn != nodeAnns {
|
||||
|
||||
t.Fatalf("unexpected number of announcements: "+
|
||||
"chanAnn=%d, chanUpd=%d, nodeAnn=%d",
|
||||
chanAnn, chanUpd, nodeAnn)
|
||||
|
||||
@@ -76,7 +76,6 @@ func TestSyncManagerNumActiveSyncers(t *testing.T) {
|
||||
|
||||
pinnedSyncers[vertex] = struct{}{}
|
||||
pinnedPubkeys[vertex] = pubkey
|
||||
|
||||
}
|
||||
|
||||
syncMgr := newPinnedTestSyncManager(numActiveSyncers, pinnedSyncers)
|
||||
|
||||
@@ -842,6 +842,7 @@ func (g *GossipSyncer) processChanRangeReply(msg *lnwire.ReplyChannelRange) erro
|
||||
// behind a few blocks from us.
|
||||
if replyLastHeight < queryLastHeight &&
|
||||
g.numChanRangeRepliesRcvd < maxReplies {
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -1377,6 +1378,7 @@ func (g *GossipSyncer) ProcessQueryMsg(msg lnwire.Message, peerQuit <-chan struc
|
||||
syncState := g.syncState()
|
||||
if syncState != waitingQueryRangeReply &&
|
||||
syncState != waitingQueryChanReply {
|
||||
|
||||
return fmt.Errorf("received unexpected query reply "+
|
||||
"message %T", msg)
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ func TestGossipSyncerReplyChanRangeQuery(t *testing.T) {
|
||||
|
||||
// TestGossipSyncerReplyChanRangeQuery tests a variety of
|
||||
// QueryChannelRange messages to ensure the underlying queries are
|
||||
// executed with the correct block range
|
||||
// executed with the correct block range.
|
||||
func TestGossipSyncerReplyChanRangeQueryBlockRange(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -1027,7 +1027,6 @@ func TestGossipSyncerReplyChanRangeQueryBlockRange(t *testing.T) {
|
||||
resultsCh <- capFilterReqs
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in new issue
Block a user