From 5cfd67aa2a291462a3b64cf8ed7a2e956dae51bc Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 18 Feb 2013 21:46:27 +0000 Subject: [PATCH] Workaround for bug in Python's math.log function --- eloipool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eloipool.py b/eloipool.py index b80e9e8..fe9d29e 100755 --- a/eloipool.py +++ b/eloipool.py @@ -176,6 +176,9 @@ def getTarget(username, now): if config.DynamicTargetting == 2: # Round target to a power of two :) truebits = log(target, 2) + if target <= 2**int(truebits): + # Workaround for bug in Python's math.log function + truebits = int(truebits) target = 2**ceil(truebits) - 1 if target == config.ShareTarget: target = None -- 2.1.4