github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/03-connection/keeper/params.go (about) 1 package keeper 2 3 import ( 4 sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 5 "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/03-connection/types" 6 ) 7 8 // GetMaxExpectedTimePerBlock retrieves the maximum expected time per block from the paramstore 9 func (k Keeper) GetMaxExpectedTimePerBlock(ctx sdk.Context) uint64 { 10 var res uint64 11 k.paramSpace.Get(ctx, types.KeyMaxExpectedTimePerBlock, &res) 12 return res 13 } 14 15 // GetParams returns the total set of ibc-connection parameters. 16 func (k Keeper) GetParams(ctx sdk.Context) types.Params { 17 return types.NewParams(k.GetMaxExpectedTimePerBlock(ctx)) 18 } 19 20 // SetParams sets the total set of ibc-connection parameters. 21 func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { 22 k.paramSpace.SetParamSet(ctx, ¶ms) 23 }