Skip to content

Commit

Permalink
fixed positive bias in local rate estimation at start
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed May 1, 2012
1 parent 9cbaaff commit 055844f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2pool/util/math.py
Expand Up @@ -243,9 +243,10 @@ def get_datums_in_last(self, dt=None):
def add_datum(self, datum):
self._prune()
t = time.time()
self.datums.append((t, datum))
if self.first_timestamp is None:
self.first_timestamp = t
else:
self.datums.append((t, datum))

if __name__ == '__main__':
import random
Expand Down

0 comments on commit 055844f

Please sign in to comment.