display at least 3 digits in hashrate displays
authorForrest Voight <forrest@forre.st>
Wed, 24 Aug 2011 19:12:58 +0000 (15:12 -0400)
committerForrest Voight <forrest@forre.st>
Wed, 24 Aug 2011 19:12:58 +0000 (15:12 -0400)
p2pool/util/math.py

index acf8a60..6f7e62f 100644 (file)
@@ -58,7 +58,7 @@ def add_dicts(dicts):
 def format(x):
     prefixes = 'kMGTPEZY'
     count = 0
-    while x >= 10000 and count < len(prefixes) - 2:
+    while x >= 100000 and count < len(prefixes) - 2:
         x = x//1000
         count += 1
     s = '' if count == 0 else prefixes[count - 1]