Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
habanoz committed Oct 16, 2019
1 parent b13106b commit 761cd77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rpc/lrpc_reward_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __get_unfrozen_rewards(self, level_of_last_block_in_unfreeze_cycle, cycle):
balance_update = balance_updates[i]
if balance_update["kind"] == "freezer":
if balance_update["delegate"] == self.baking_address:
if int(balance_update["cycle"]) != cycle or int(balance_update["change"])>0:
if int(balance_update["cycle"]) == cycle or int(balance_update["change"])<0:
if balance_update["category"] == "rewards":
unfrozen_rewards = -int(balance_update["change"])
logger.debug("[__get_unfrozen_rewards] Found balance update for reward {}".format(balance_update))
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/prpc_reward_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __get_unfrozen_rewards(self, level_of_last_block_in_unfreeze_cycle, cycle):
balance_update = balance_updates[i]
if balance_update["kind"] == "freezer":
if balance_update["delegate"] == self.baking_address:
if int(balance_update["cycle"]) != cycle or int(balance_update["change"])>0:
if int(balance_update["cycle"]) == cycle or int(balance_update["change"]) < 0:
if balance_update["category"] == "rewards":
unfrozen_rewards = -int(balance_update["change"])
logger.debug("[__get_unfrozen_rewards] Found balance update for reward {}".format(balance_update))
Expand Down

0 comments on commit 761cd77

Please sign in to comment.