1
0

show lightning network capacity in GUI

This commit is contained in:
ThomasV
2018-12-09 11:56:37 +01:00
parent 47c07f77b4
commit f4b9d2f47c
2 changed files with 28 additions and 6 deletions

View File

@@ -352,6 +352,10 @@ class ChannelDB(JsonDB):
# number of channels
return len(self._id_to_channel_info)
def capacity(self):
# capacity of the network
return sum(c.capacity_sat for c in self._id_to_channel_info.values())
def get_channel_info(self, channel_id: bytes) -> Optional[ChannelInfo]:
return self._id_to_channel_info.get(channel_id, None)