Skip to content

Commit

Permalink
Make args and other vars const
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Oct 21, 2024
1 parent 8bc1a3f commit e2af55a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/dfi/masternodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ bool CCustomCSView::CanSpend(const uint256 &txId, int height) const {
return !pair || pair->second.destructionTx != uint256{} || pair->second.IsPoolShare();
}

bool CCustomCSView::CalculateOwnerRewards(const CScript &owner, uint32_t targetHeight, bool skipStatic) {
auto balanceHeight = GetBalancesHeight(owner);
bool CCustomCSView::CalculateOwnerRewards(const CScript &owner, const uint32_t targetHeight, const bool skipStatic) {
const auto balanceHeight = GetBalancesHeight(owner);
if (balanceHeight >= targetHeight) {
return false;
}
Expand All @@ -982,7 +982,7 @@ bool CCustomCSView::CalculateOwnerRewards(const CScript &owner, uint32_t targetH
bool perBlockUpdated{};

ForEachPoolId([&](DCT_ID const &poolId) {
auto height = GetShare(poolId, owner);
const auto height = GetShare(poolId, owner);
if (!height || *height >= targetHeight) {
return true; // no share or target height is before a pool share' one
}
Expand Down
2 changes: 1 addition & 1 deletion src/dfi/masternodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class CCustomCSView : public CMasternodesView,

bool CanSpend(const uint256 &txId, int height) const;

bool CalculateOwnerRewards(const CScript &owner, uint32_t height, bool skipStatic = false);
bool CalculateOwnerRewards(const CScript &owner, const uint32_t height, const bool skipStatic = false);

ResVal<CAmount> GetAmountInCurrency(CAmount amount,
CTokenCurrencyPair priceFeedId,
Expand Down

0 comments on commit e2af55a

Please sign in to comment.