channeldb: add FetchAllChannels method to return all active channels

This commit introduces a new method to channeldb: ‘FetchAllChannels’.
This method can be used to obtain the state of all active (currently
open) channels within the database. This method can be used for compute
basic channel-based metrics or exposed as an RPC in order to allow
clients to display/query channel data.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-10-26 14:53:26 -07:00
1 parent 3354685292
commit 9191fbd317
2 files changed
+93 -28

No files matched your search

+1
View File
@@ -49,6 +49,7 @@ type LinkNode struct {
// channel should be unilaterally closed due to inactivity.
//
// TODO(roasbeef): replace with block hash/height?
// * possibly add a time-value metric into the heuristic?
LastSeen time.Time
// Addresses is a list of IP address in which either we were able to