Browse Source

Make the relay unit test more robust as to which Walking Onions mode it's in

Ian Goldberg 4 years ago
parent
commit
aa832b1b4c
1 changed files with 6 additions and 5 deletions
  1. 6 5
      relay.py

+ 6 - 5
relay.py

@@ -758,11 +758,12 @@ if __name__ == '__main__':
 
     dirauth.Consensus.verify(dirauth.DirAuth.consensus,
             network.thenetwork.dirauthkeys(), perfstats)
-    dirauth.ENDIVE.verify(dirauth.DirAuth.endive,
-            network.thenetwork.dirauthkeys(), perfstats)
-    for s in dirauth.DirAuth.endive.enddict['snips']:
-        dirauth.SNIP.verify(s, dirauth.DirAuth.consensus,
-                network.thenetwork.dirauthkeys()[0], perfstats)
+    if network.thenetwork.womode != network.WOMode.VANILLA:
+        dirauth.ENDIVE.verify(dirauth.DirAuth.endive,
+                network.thenetwork.dirauthkeys(), perfstats)
+        for s in dirauth.DirAuth.endive.enddict['snips']:
+            dirauth.SNIP.verify(s, dirauth.DirAuth.consensus,
+                    network.thenetwork.dirauthkeys()[0], perfstats)
 
     print('ticked; epoch=', network.thenetwork.getepoch())