diff --git a/proofow.py b/proofow.py index da06fb1..cd06c07 100644 --- a/proofow.py +++ b/proofow.py @@ -18,8 +18,8 @@ class pow_base: self._base = urandom(self._bits//8) if not base else base self._target = 2 ** (self._bits - difficulty) - def work(self, max_attempts=0): - cycles = count() if max_attempts == 0 else range(max_attempts) + def work(self, max_attempts=0, start=0, step=1): + cycles = count(start, step) if max_attempts == 0 else range(start, max_attempts, step) for nonce in cycles: if self.verify(nonce): return nonce