Skip to content

Instantly share code, notes, and snippets.

@jtgrassie jtgrassie/max-monero.py Secret
Created Aug 17, 2019

Embed
What would you like to do?
#!/usr/bin/env python
import sys
height = 1902391
if len(sys.argv) == 2:
try:
height = int(sys.argv[1])
except:
print("Error parsing height")
print("Usage: {} <height>".format(sys.argv[0]))
print("Falling back to a preset default ({})".format(height))
v2 = 1009827
M = 2**64-1
A = 0
h = 0
while h < height and h < v2:
A += ((M-A) * 2**-20)
h += 1
while h < height:
A += ((M-A) * 2**-20 * 2)
h += 1
print("Maximum allowed emission for height {} is {} XMR".format(height, int(A)*10**-12))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.