From d7c7d66f970c611f597e98b442b32dad806600ca Mon Sep 17 00:00:00 2001 From: shillogatu Date: Sun, 17 Sep 2017 10:33:34 -0600 Subject: [PATCH] No negative fork time remove negative fork time --- network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/network.py b/network.py index 4d5d57c..d55be21 100644 --- a/network.py +++ b/network.py @@ -14,7 +14,10 @@ def fork(bot, trigger): try: height=j["network"]["height"] forkheight=1400000 - 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)) + 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)) + else: + bot.say("I don't know when the next fork is.") except: bot.say("Something borked -_-")