2020-12-21 17:18:55 +00:00
|
|
|
package hard
|
2020-09-21 21:08:43 +00:00
|
|
|
|
|
|
|
import (
|
2023-08-25 22:14:35 +00:00
|
|
|
"time"
|
|
|
|
|
2024-05-01 03:17:24 +00:00
|
|
|
"github.com/0glabs/0g-chain/x/hard/keeper"
|
|
|
|
"github.com/0glabs/0g-chain/x/hard/types"
|
2023-08-25 22:14:35 +00:00
|
|
|
"github.com/cosmos/cosmos-sdk/telemetry"
|
2020-09-21 21:08:43 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
)
|
|
|
|
|
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 22:14:35 +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
|
|
|
}
|