avoid shadowed declaration
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 32s Details

This commit is contained in:
Ladd Hoffman 2024-04-16 19:14:07 -05:00
parent aedb6d3008
commit 50b0c1d82f
1 changed files with 3 additions and 3 deletions

View File

@ -247,13 +247,13 @@ contract ValidationPools is Reputation, Forum {
}
// Due to rounding, there may be some excess REP. Award it to the author.
uint remainder = totalRewards - totalAllocated;
uint reward = pool.minted / 2 + remainder;
if (pool.minted % 2 != 0) {
// We staked the odd remainder in favor of the post, on behalf of the author.
reward += 1;
remainder += 1;
}
// Transfer REP to the forum instead of to the author directly
_onValidatePost(pool.postIndex, reward);
_onValidatePost(pool.postIndex, pool.minted / 2 + remainder);
} else {
// If vote does not pass, divide the losing stake among the winners
totalRewards += pool.minted;