mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 16:25:21 +00:00
4c1524d7bc
* refactor begin blocker to single func * remove unused inflation keeper methods * refactor to private keeper methods * add testcase for failed mint due to invalid param * add testcase for GetStakingApy() * check for zero instead of empty * actually test super long block time * skip fund account for earn community proposals * test x/community keeper GetModuleAccountBalance * update x/kavamint begin block spec
14 lines
322 B
Go
14 lines
322 B
Go
package kavamint
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/kava-labs/kava/x/kavamint/keeper"
|
|
)
|
|
|
|
// BeginBlocker mints & distributes new tokens for the previous block.
|
|
func BeginBlocker(ctx sdk.Context, k keeper.KeeperI) {
|
|
if err := k.AccumulateAndMintInflation(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|