git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
a7edadd
)
prevent division by 0 when block headers are not fully downloaded
author
Forrest Voight
<forrest@forre.st>
Sun, 5 Feb 2012 11:19:57 +0000 (06:19 -0500)
committer
Forrest Voight
<forrest@forre.st>
Sun, 5 Feb 2012 11:19:57 +0000 (06:19 -0500)
p2pool/data.py
patch
|
blob
|
history
diff --git
a/p2pool/data.py
b/p2pool/data.py
index
81e77c3
..
d402fd8
100644
(file)
--- a/
p2pool/data.py
+++ b/
p2pool/data.py
@@
-409,7
+409,7
@@
class OkayTracker(forest.Tracker):
best = best_share.previous_hash
timestamp_cutoff = min(int(time.time()), best_share.timestamp) - 3600
- target_cutoff = 2**256//(self.net.SHARE_PERIOD*best_tail_score[1]) * 2 if best_tail_score[1] is not None else 2**256-1
+ target_cutoff = 2**256//(self.net.SHARE_PERIOD*best_tail_score[1] + 1) * 2 if best_tail_score[1] is not None else 2**256-1
else:
timestamp_cutoff = int(time.time()) - 24*60*60
target_cutoff = 2**256-1