Skip to content

Commit

Permalink
Test epoch poanetwork#1 for BlockReward contract
Browse files Browse the repository at this point in the history
  • Loading branch information
i-stam committed May 28, 2020
1 parent 5663ee0 commit f94649a
Show file tree
Hide file tree
Showing 2 changed files with 1,735 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/base/BlockRewardHbbftBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ contract BlockRewardHbbftBase is UpgradeableOwned, IBlockRewardHbbft {
}
}

require(numRewardedValidators != 0, "No validators to be rewarded");
// No rewards distributed in this epoch
if (numRewardedValidators == 0){
return 0;
}

// Share the reward equally among the validators.
uint256 poolReward = totalReward / numRewardedValidators;
Expand Down
Loading

0 comments on commit f94649a

Please sign in to comment.