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:
2 files changed
+93
-28
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user