Commit Graph

8 Commits

Author SHA1 Message Date
carla
1e86589bee chanfitness: Add channel event store
This commit adds a channel event store to the channel fitness
package which is used to manage tracking of a node's channels.
It adds tracking for channel open/closed and peer online/offline
events for all channels that a node has open.

Events are consumed from channelNotifier and peerNotifier event
subscriptions. If either of these subscriptions is cancelled,
channel scoring stops, because both subscriptions are expected
to run until node shutdown.

Two functions are exposed to allow external callers to get uptime
information about a channel. GetLifespan returns the period over
which the channel has been monitored. GetUptime returns the channel's
uptime over a specified period. Callers can use these functions to
get the channel's remote peer uptime over its entire lifetime, or
a subset of that period.
2019-10-25 09:55:09 +02:00
Olaoluwa Osuntokun
16941d7aad
build: nerf linter 2019-09-25 16:05:31 -07:00
Johan T. Halseth
00d1890dd0
lint: skip files generated for mobile 2019-09-18 09:07:21 +02:00
Joost Jager
23517587aa
build: disable funlen 2019-09-13 14:11:32 +02:00
Joost Jager
5249a21a65
build: enable linters for future changes 2019-09-12 21:16:38 +02:00
Joost Jager
51f2096dbd
build: enable unused linting 2019-09-10 17:22:05 +02:00
Joost Jager
e64542aa1c
build: lint with build tags 2019-09-10 17:22:03 +02:00
Johan T. Halseth
3207c8a736
make: change linter gometalinter->golangci-lint 2019-08-07 10:53:09 +02:00