2020-12-21 17:18:55 +00:00
|
|
|
package hard
|
2020-09-21 21:08:43 +00:00
|
|
|
|
|
|
|
import (
|
2023-08-25 23:11:45 +00:00
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/telemetry"
|
2020-09-21 21:08:43 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2022-01-08 00:39:27 +00:00
|
|
|
"github.com/kava-labs/kava/x/hard/keeper"
|
2023-08-25 23:11:45 +00:00
|
|
|
"github.com/kava-labs/kava/x/hard/types"
|
2020-09-21 21:08:43 +00:00
|
|
|
)
|
|
|
|
|
2021-02-22 20:52:17 +00:00
|
|
|
// BeginBlocker updates interest rates
|
2022-01-08 00:39:27 +00:00
|
|
|
func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
|
2023-08-25 23:11:45 +00:00
|
|
|
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
|
|
|
|
|
2020-11-13 15:51:52 +00:00
|
|
|
k.ApplyInterestRateUpdates(ctx)
|
2020-09-21 21:08:43 +00:00
|
|
|
}
|