2020-04-16 08:10:39 -07:00
|
|
|
package std
|
|
|
|
|
|
|
|
import (
|
|
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
2020-08-14 10:58:53 -07:00
|
|
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
2020-04-16 08:10:39 -07:00
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/baseapp"
|
2020-06-12 06:52:04 -07:00
|
|
|
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
2020-04-16 08:10:39 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// ConsensusParamsKeyTable returns an x/params module keyTable to be used in
|
|
|
|
// the BaseApp's ParamStore. The KeyTable registers the types along with the
|
|
|
|
// standard validation functions. Applications can choose to adopt this KeyTable
|
|
|
|
// or provider their own when the existing validation functions do not suite their
|
|
|
|
// needs.
|
2020-06-12 06:52:04 -07:00
|
|
|
func ConsensusParamsKeyTable() paramstypes.KeyTable {
|
|
|
|
return paramstypes.NewKeyTable(
|
|
|
|
paramstypes.NewParamSetPair(
|
2020-04-16 08:10:39 -07:00
|
|
|
baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams,
|
|
|
|
),
|
2020-06-12 06:52:04 -07:00
|
|
|
paramstypes.NewParamSetPair(
|
2020-08-14 10:58:53 -07:00
|
|
|
baseapp.ParamStoreKeyEvidenceParams, tmproto.EvidenceParams{}, baseapp.ValidateEvidenceParams,
|
2020-04-16 08:10:39 -07:00
|
|
|
),
|
2020-06-12 06:52:04 -07:00
|
|
|
paramstypes.NewParamSetPair(
|
2020-08-14 10:58:53 -07:00
|
|
|
baseapp.ParamStoreKeyValidatorParams, tmproto.ValidatorParams{}, baseapp.ValidateValidatorParams,
|
2020-04-16 08:10:39 -07:00
|
|
|
),
|
|
|
|
)
|
|
|
|
}
|