diff --git a/DAS/results.py b/DAS/results.py index 7134ff2..c6a87f1 100644 --- a/DAS/results.py +++ b/DAS/results.py @@ -21,7 +21,9 @@ class Result: self.shape = shape self.missingVector = missingVector missingSamples = missingVector[-1] - if missingSamples == 0: + validatorsReady = self.metrics["progress"]["validators ready"][-1] + #print("There are %05.3f%% validators ready" % (validatorsReady*100)) + if validatorsReady > config.successCondition: self.blockAvailable = 1 self.tta = len(missingVector) * (config.stepDuration) else: diff --git a/config_example.py b/config_example.py index 39a0591..7263ca1 100644 --- a/config_example.py +++ b/config_example.py @@ -76,6 +76,9 @@ randomSeed = "DAS" # Number of steps without progress to stop simulation steps4StopCondition = 7 +# Number of validators ready to asume block is available +successCondition = 0.9 + # If True, print diagnostics when the block is not available diagnostics = False