Skip to content

Commit

Permalink
fix: Rename supplier app stake retrieval fn
Browse files Browse the repository at this point in the history
  • Loading branch information
red-0ne committed Oct 30, 2024
1 parent 4c65e84 commit ee93efa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/relayer/proxy/relay_meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (rmtr *ProxyRelayMeter) forEachEventApplicationStakedFn(ctx context.Context
continue
}
appMetrics.app.Stake = app.GetStake()
appStakeShare := getApplicationStakeShare(app.GetStake(), appMetrics.sharedParams)
appStakeShare := getSupplierAppStake(app.GetStake(), appMetrics.sharedParams)
appMetrics.maxCoin = appStakeShare.Add(rmtr.overServicingAllowanceCoins)
}
}
Expand Down Expand Up @@ -278,8 +278,8 @@ func (rmtr *ProxyRelayMeter) ensureRequestAppMetrics(ctx context.Context, reqMet
}

// calculate the max amount of stake the application can consume in the current session.
appStakeShare := getApplicationStakeShare(app.Stake, sharedParams)
maxAmount := appStakeShare.Add(rmtr.overServicingAllowanceCoins)
supplierAppStake := getSupplierAppStake(app.Stake, sharedParams)
maxAmount := supplierAppStake.Add(rmtr.overServicingAllowanceCoins)
appMetrics = &appRelayMeter{
app: app,
consumedCoin: cosmostypes.NewInt64Coin(volatile.DenomuPOKT, 0),
Expand Down Expand Up @@ -365,7 +365,7 @@ func getMinedRelayCostCoin(

// getMinedRelayCost returns the share of the application's stake that can be consumed
// per supplier per session.
func getApplicationStakeShare(
func getSupplierAppStake(
stake *cosmostypes.Coin,
sharedParams *sharedtypes.Params,
) cosmostypes.Coin {
Expand Down

0 comments on commit ee93efa

Please sign in to comment.