Skip to content

Commit

Permalink
chanfitness: exit early when there are no updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Nov 12, 2024
1 parent 854f8fe commit f144998
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chanfitness/chaneventstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,5 +584,10 @@ func (c *ChannelEventStore) recordFlapCount() error {

log.Debugf("recording flap count for: %v peers", len(updates))

// Exit early if there are no updates.
if len(updates) == 0 {
return nil
}

return c.cfg.WriteFlapCount(updates)
}

0 comments on commit f144998

Please sign in to comment.