From 20aa63e7cf52c783421abeef7212785eb1679844 Mon Sep 17 00:00:00 2001 From: "marko.b" Date: Wed, 20 Sep 2023 11:43:00 +0200 Subject: [PATCH] change var name to local --- src/PostageStamp.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PostageStamp.sol b/src/PostageStamp.sol index 04e39b95..11d7e9bb 100644 --- a/src/PostageStamp.sol +++ b/src/PostageStamp.sol @@ -401,7 +401,7 @@ contract PostageStamp is AccessControl, Pausable { */ function expireLimited(uint256 limit) public { // the lower bound of the normalised balance for which we will check if batches have expired - uint256 leb = lastExpiryBalance; + uint256 _lastExpiryBalance = lastExpiryBalance; uint256 i; for (i; i < limit; ) { if (isBatchesTreeEmpty()) { @@ -430,7 +430,7 @@ contract PostageStamp is AccessControl, Pausable { validChunkCount -= batchSize; // since the batch expired _during_ the period we must add // remaining normalised payout for this batch only - pot += batchSize * (batch.normalisedBalance - leb); + pot += batchSize * (batch.normalisedBalance - _lastExpiryBalance); tree.remove(fbi, batch.normalisedBalance); delete batches[fbi]; @@ -443,7 +443,7 @@ contract PostageStamp is AccessControl, Pausable { // multiplied by the remaining total valid chunk count // to the pot for the period since the last expiry - if (lastExpiryBalance < leb) { + if (lastExpiryBalance < _lastExpiryBalance) { revert TotalOutpaymentDecreased(); } @@ -451,7 +451,7 @@ contract PostageStamp is AccessControl, Pausable { // add the total normalised payout of all batches // multiplied by the remaining total valid chunk count // to the pot for the period since the last expiry - pot += validChunkCount * (lastExpiryBalance - leb); + pot += validChunkCount * (lastExpiryBalance - _lastExpiryBalance); } /**