From 50b0c1d82fd5b41833da07cfbc2578b5ae215a9e Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Tue, 16 Apr 2024 19:14:07 -0500 Subject: [PATCH] avoid shadowed declaration --- ethereum/contracts/core/ValidationPools.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethereum/contracts/core/ValidationPools.sol b/ethereum/contracts/core/ValidationPools.sol index 77e6800..2fb0e21 100644 --- a/ethereum/contracts/core/ValidationPools.sol +++ b/ethereum/contracts/core/ValidationPools.sol @@ -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;