viff

changeset 683:c1ad22124f89

Benchmark would fail with only three players.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 25 Apr 2008 11:26:05 +0200
parents f9fe663c0de1
children 95a26f4d2a9e
files apps/benchmark.py viff/runtime.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Sat Apr 12 13:40:16 2008 +0200
     1.2 +++ b/apps/benchmark.py	Fri Apr 25 11:26:05 2008 +0200
     1.3 @@ -212,7 +212,7 @@
     1.4  else:
     1.5      benchmark = SequentialBenchmark
     1.6  
     1.7 -pre_runtime = create_runtime(id, players, (len(players) -1)//3,
     1.8 +pre_runtime = create_runtime(id, players, max((len(players) -1)//3, 1),
     1.9                               options, runtime_class)
    1.10  pre_runtime.addCallback(benchmark, operation)
    1.11  
     2.1 --- a/viff/runtime.py	Sat Apr 12 13:40:16 2008 +0200
     2.2 +++ b/viff/runtime.py	Fri Apr 25 11:26:05 2008 +0200
     2.3 @@ -410,6 +410,7 @@
     2.4          L{create_runtime} function should be used instead to create a
     2.5          usable runtime.
     2.6          """
     2.7 +        assert threshold > 0, "Must use a positive threshold."
     2.8          #: ID of this player.
     2.9          self.id = player.id
    2.10          #: Shamir secret sharing threshold.