[chutney/master] TorNet: add and call updateLastStatus

commit 73db8ee08d67659a8a64dd3bba5656d81c0a3ae4 Author: c <c@chroniko.jp> Date: Sun May 17 04:43:21 2020 +0000 TorNet: add and call updateLastStatus This will update node's status all at once (last onion descriptor status received, last bootstrap status received). I still want to refactor most recent descriptor status, stay tuned --- lib/chutney/TorNet.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py index fa268d3..b211fc2 100644 --- a/lib/chutney/TorNet.py +++ b/lib/chutney/TorNet.py @@ -1221,6 +1221,13 @@ class LocalNodeController(NodeController): """ return self.most_recent_bootstrap_status + def updateLastStatus(self): + """Update last messages this node has received, for use with + isBootstrapped and the getLast* functions. + """ + self.updateLastOnionServiceDescStatus() + self.updateLastBootstrapStatus() + def isBootstrapped(self): """Return true iff the logfile says that this instance is bootstrapped.""" @@ -2283,7 +2290,7 @@ class Network(object): most_recent_desc_status = dict() for c in controllers: nick = c.getNick() - c.updateLastBootstrapStatus() + c.updateLastStatus() if not c.isBootstrapped(): all_bootstrapped = False
participants (1)
-
nickm@torproject.org