chanfitness: record timestamped flap count for peers

In preparation for storing our flap count on disk, we start tracking
flap count per-peer.
This commit is contained in:
carla committed 2020-09-08 13:47:19 +02:00
1 parent e05b4a8e2e
commit 8b09b2d716
3 files changed
+63 -10

No files matched your search

+5
View File
@@ -26,4 +26,9 @@ type peerMonitor interface {
// the channel has been monitored for and its uptime over this period.
channelUptime(channelPoint wire.OutPoint) (time.Duration,
time.Duration, error)
// getFlapCount returns the peer's flap count and the timestamp that we
// last recorded a flap, which may be nil if we have never recorded a
// flap for this peer.
getFlapCount() (int, *time.Time)
}