[tor-commits] [chutney/master] TorNet: Also check oniondesc in isBootstrapped()

nickm at torproject.org nickm at torproject.org
Tue Jul 7 15:12:53 UTC 2020


commit 2b3cee08768b233029ce4db20014f258a5d1e27d
Author: c <c at chroniko.jp>
Date:   Sun Apr 5 11:16:04 2020 +0000

    TorNet: Also check oniondesc in isBootstrapped()
    
    Make isBootstrapped() check return both for getLastBootstrapStatus() and
    getLastOnionServiceDescStatus() and return true iff both succeed.
---
 lib/chutney/TorNet.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index db7845e..7838a78 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -1214,7 +1214,12 @@ class LocalNodeController(NodeController):
         """Return true iff the logfile says that this instance is
            bootstrapped."""
         pct, _, _ = self.getLastBootstrapStatus()
-        return pct == LocalNodeController.SUCCESS_CODE
+        if pct != LocalNodeController.SUCCESS_CODE:
+            return False
+        pct, _, _ = self.getLastOnionServiceDescStatus()
+        if pct != LocalNodeController.ONIONDESC_PUBLISHED_CODE:
+            return False
+        return True
 
     # There are 7 v3 directory document types, but some networks only use 6,
     # because they don't have a bridge authority





More information about the tor-commits mailing list