2017-02-21 12:27:32 +00:00
|
|
|
import random
|
|
|
|
import datetime
|
|
|
|
|
2017-06-18 09:16:48 +00:00
|
|
|
diffs = [729.20 * 10**12]
|
|
|
|
hashpower = diffs[0] / 16.20
|
|
|
|
times = [1497624318]
|
2017-02-21 12:27:32 +00:00
|
|
|
|
|
|
|
|
2017-06-18 09:16:48 +00:00
|
|
|
for i in range(3882573, 6010000):
|
2017-02-21 12:27:32 +00:00
|
|
|
blocktime = random.expovariate(hashpower / diffs[-1])
|
|
|
|
adjfac = max(1 - int(blocktime / 10), -99) / 2048.
|
|
|
|
newdiff = diffs[-1] * (1 + adjfac)
|
|
|
|
if i > 200000:
|
|
|
|
newdiff += 2 ** ((i - 200000) // 100000)
|
|
|
|
diffs.append(newdiff)
|
|
|
|
times.append(times[-1] + blocktime)
|
|
|
|
if i % 10000 == 0:
|
2017-05-30 12:35:21 +00:00
|
|
|
print('Block %d, approx ETH supply %d, time %r blocktime %.2f' % \
|
|
|
|
(i, 60102216 * 1.199 + 5.3 * i, datetime.datetime.utcfromtimestamp(times[-1]).isoformat().replace('T',' '), diffs[-1] / hashpower))
|
2017-02-21 12:27:32 +00:00
|
|
|
# print int(adjfac * 2048)
|