Skip to content

Commit 15a4bf1

Browse files
rustyrussellcdecker
authored andcommitted
pyln/client/gossmap: add a little documentation.
Signed-off-by: Rusty Russell <[email protected]>
1 parent a68aeb2 commit 15a4bf1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contrib/pyln-client/pyln/client/gossmap.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class point(bytes):
3838

3939

4040
class GossmapChannel(object):
41+
"""A channel: fields of channel_announcement are in .fields, optional updates are in .updates_fields, which can be None of there has been no channel update."""
4142
def __init__(self,
4243
fields: Dict[str, Any],
4344
announce_offset: int,
@@ -56,6 +57,10 @@ def __init__(self,
5657

5758

5859
class GossmapNode(object):
60+
"""A node: fields of node_announcement are in .announce_fields, which can be None of there has been no node announcement.
61+
62+
.channels is a list of the GossmapChannels attached to this node.
63+
"""
5964
def __init__(self, node_id: point):
6065
self.announce_fields: Optional[Dict[str, Any]] = None
6166
self.announce_offset = None
@@ -127,6 +132,7 @@ def add_node_announcement(self, rec: bytes, off: int):
127132
self.nodes[fields['node_id']].announce_offset = off
128133

129134
def reopen_store(self):
135+
"""FIXME: Implement!"""
130136
assert False
131137

132138
def remove_channel_by_deletemsg(self, rec: bytes):

0 commit comments

Comments
 (0)