Explorar o código

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

Ian Goldberg %!s(int64=4) %!d(string=hai) anos
pai
achega
aa832b1b4c
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  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())