mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 01:33:02 +01:00
graph: fix staticcheck
suggestion
From staticcheck: QF1002 - Convert untagged switch to tagged switch.
This commit is contained in:
parent
001e5599b6
commit
eb2b0c783f
@ -1408,11 +1408,10 @@ func (b *Builder) processUpdate(msg interface{},
|
||||
// check if we already have the most up-to-date information for
|
||||
// that edge. If this message has a timestamp not strictly
|
||||
// newer than what we already know of we can exit early.
|
||||
switch {
|
||||
switch msg.ChannelFlags & lnwire.ChanUpdateDirection {
|
||||
// A flag set of 0 indicates this is an announcement for the
|
||||
// "first" node in the channel.
|
||||
case msg.ChannelFlags&lnwire.ChanUpdateDirection == 0:
|
||||
|
||||
case 0:
|
||||
// Ignore outdated message.
|
||||
if !edge1Timestamp.Before(msg.LastUpdate) {
|
||||
return NewErrf(ErrOutdated, "Ignoring "+
|
||||
@ -1423,8 +1422,7 @@ func (b *Builder) processUpdate(msg interface{},
|
||||
|
||||
// Similarly, a flag set of 1 indicates this is an announcement
|
||||
// for the "second" node in the channel.
|
||||
case msg.ChannelFlags&lnwire.ChanUpdateDirection == 1:
|
||||
|
||||
case 1:
|
||||
// Ignore outdated message.
|
||||
if !edge2Timestamp.Before(msg.LastUpdate) {
|
||||
return NewErrf(ErrOutdated, "Ignoring "+
|
||||
|
Loading…
x
Reference in New Issue
Block a user