Skip to content

Commit

Permalink
feat: start reducing storage reads
Browse files Browse the repository at this point in the history
Co-authored-by: Mikhail Wall <[email protected]>
  • Loading branch information
ckartik and Mikelle committed Sep 17, 2024
1 parent 011ea51 commit a998e0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/contracts/core/ProviderRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ contract ProviderRegistry is
// if the provider's stake is less than the residual amount + penalty fee, we need to adjust the residual amount and penalty fee
// this is to prevent underflow and ensure the contract doesn't revert
// We also emit
uint256 providerStake = providerStakes[provider];
if (providerStakes[provider] < residualAmt + penaltyFee) {
emit InsufficientFundsToSlash(provider, providerStakes[provider], residualAmt, penaltyFee);
if (providerStakes[provider] < residualAmt) {
Expand Down

0 comments on commit a998e0b

Please sign in to comment.