Skip to content

Commit

Permalink
check presence of lost_fees_denounciation_baking
Browse files Browse the repository at this point in the history
  • Loading branch information
habanoz committed Sep 25, 2019
1 parent 9e629ec commit 98c07a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tzscan/tzscan_reward_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def get_rewards_for_cycle_map(self, cycle):
else:
lost_rewards_denounciation = int(root["lost_rewards_denounciation"])

lost_fees_denounciation = int(root["lost_fees_denounciation_baking"])+int(root["lost_fees_denounciation_endorsement"])
if "lost_fees_denounciation_baking" in root:
lost_fees_denounciation = int(root["lost_fees_denounciation_baking"])+int(root["lost_fees_denounciation_endorsement"])
else:
lost_fees_denounciation = int(root["lost_fees_denounciation"])

fees = int(root["fees"])

total_reward_amount = (blocks_rewards + endorsements_rewards + future_blocks_rewards +
Expand Down

0 comments on commit 98c07a4

Please sign in to comment.