No negative fork time

remove negative fork time
This commit is contained in:
shillogatu 2017-09-17 10:33:34 -06:00
parent 718bcf8500
commit d7c7d66f97
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ def fork(bot, trigger):
try: try:
height=j["network"]["height"] height=j["network"]["height"]
forkheight=1400000 forkheight=1400000
if forkheight > height:
bot.say("The current block height is {0:,}. Fork height is {1:,}. {2:,} blocks to go, happening in approximately {3:.2f} hours.".format(height,forkheight,forkheight-height,(forkheight-height)/30.0)) bot.say("The current block height is {0:,}. Fork height is {1:,}. {2:,} blocks to go, happening in approximately {3:.2f} hours.".format(height,forkheight,forkheight-height,(forkheight-height)/30.0))
else:
bot.say("I don't know when the next fork is.")
except: except:
bot.say("Something borked -_-") bot.say("Something borked -_-")