Skip to content

Commit

Permalink
reset recorded node height if disconnected for too long
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Sep 16, 2024
1 parent 9dc0c75 commit 3a95c37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions node/light_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def connect(self, ip: str, port: int, node_type: Optional[NodeType]):
self.nodes[key].connect(ip, port)
self.last_connect_attempt[key] = time.time()
self.states[key]["last_ping"] = time.time()
self.states[key]["height"] = None

def incoming(self, ip: str, port: int, node: "LightNode"):
key = ":".join([ip, str(port)])
Expand Down

0 comments on commit 3a95c37

Please sign in to comment.