Last active
November 7, 2022 04:54
-
-
Save arnabghose997/658954e2e1d1214f7b465d91f47480f6 to your computer and use it in GitHub Desktop.
Check the time until upgrade height is reached in Tedermint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
BLOCK_TIME = 5 # Estimated | |
def figure_out_expected_time(current_height, upgrade_height): | |
difference_in_seconds = (upgrade_height - current_height) * BLOCK_TIME | |
return str(datetime.timedelta(seconds=difference_in_seconds)) | |
if __name__=='__main__': | |
current_block_height = 537744 # Look at Explorer | |
expected_block_height = 629716 | |
print("Expected time left: ", figure_out_expected_time(537744, 629716)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment