Created
July 6, 2017 07:56
-
-
Save Derfirm/f632db677d15d6e5ffb8c78fe49292f4 to your computer and use it in GitHub Desktop.
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
litecoin_difficulty = 250000 | |
farm_hashrate = 500e6 | |
initial_block = 50 | |
def calculate_block_time_found(difficulty, hashrate): | |
return difficulty * 2**32 / hashrate | |
def calculate_coin_hour(difficulty, hashrate, block_reward): | |
return block_reward / (calculate_block_time_found(difficulty, hashrate) / 60 / 60) | |
def calculate_coin_week(difficulty, hashrate, block_reward): | |
return calculate_coin_day(difficulty, hashrate, block_reward) * 7 | |
def calculate_coin_day(difficulty, hashrate, block_reward): | |
return calculate_coin_hour(difficulty, hashrate, block_reward) * 24 | |
def calculate_coin_month(difficulty, hashrate, block_reward): | |
return calculate_coin_day(difficulty, hashrate, block_reward) * 30 | |
print calculate_coin_month(litecoin_difficulty, farm_hashrate, initial_block) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment