From 24fd7bd79bbca32bb557895d8946aa395d8cbc67 Mon Sep 17 00:00:00 2001 From: theStack Date: Sat, 19 May 2018 09:10:18 -0400 Subject: [PATCH] max_money.py: use variable start_block_reward (eliminate magic number) --- code/max_money.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/max_money.py b/code/max_money.py index fcb44509..4b739019 100644 --- a/code/max_money.py +++ b/code/max_money.py @@ -1,12 +1,11 @@ -# Original block reward for miners was 50 BTC -start_block_reward = 50 +# Original block reward for miners was 50 BTC = 50 0000 0000 Satoshis +start_block_reward = 50 * 10**8 # 210000 is around every 4 years with a 10 minute block interval reward_interval = 210000 def max_money(): - # 50 BTC = 50 0000 0000 Satoshis - current_reward = 50 * 10**8 + current_reward = start_block_reward total = 0 while current_reward > 0: total += reward_interval * current_reward