lnd.xprv/chanfitness
carla eebc23a8ad
chanfitness: set open time for channels with offline peers
This commit addresses a bug in the channel event store
where the opened time of a channel event log was not
set for peers that were offline on startup.

Previously, opened time was set to the time of the first
event in the event log. This worked for online peers,
because the eventlog was created with an initial online
event. However, offline peers had no inital event so had
no open time set.

This commit simplifies the creation of an event log by
removing the initial event and setting open time for all
event logs. This has the effect of potentially introducing
a gap between opened time for a log and the first peer
online event for peers with channels that exist at startup
if a peer takes time to reconnect. However, the cost of this
is less than the benefit of reducing the bug-prone custom
code path that was previously in place.
2019-12-17 17:36:28 +02:00
..
chanevent_test.go chanfitness: Add channel event log structure 2019-10-25 09:51:07 +02:00
chanevent.go chanfitness: set open time for channels with offline peers 2019-12-17 17:36:28 +02:00
chaneventstore_test.go chanfitness: set open time for channels with offline peers 2019-12-17 17:36:28 +02:00
chaneventstore.go chanfitness: set open time for channels with offline peers 2019-12-17 17:36:28 +02:00
log.go chanfitness: Add channel event log structure 2019-10-25 09:51:07 +02:00