Skip to content

Commit

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

if "lost_rewards_denounciation_baking" in root:
lost_rewards_denounciation = int(root["lost_rewards_denounciation_baking"])+int(root["lost_rewards_denounciation_endorsement"])
else:
lost_rewards_denounciation = int(root["lost_rewards_denounciation"])

lost_fees_denounciation = int(root["lost_fees_denounciation_baking"])+int(root["lost_fees_denounciation_endorsement"])
fees = int(root["fees"])

Expand Down

0 comments on commit 9e629ec

Please sign in to comment.