[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2b3cee08768b233029ce4db20014f258a5d1e27d
Author: c <c@xxxxxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits