Merge PR #5952: Refactor Evidence Age Util + Governable Consensus Params

This commit is contained in:
Alexander Bezobchuk
2020-04-16 11:10:39 -04:00
committed by GitHub
parent b26109c5dc
commit 09a55f68b5
49 changed files with 521 additions and 665 deletions
+27
View File
@@ -0,0 +1,27 @@
package std
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/x/params"
)
// 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.
func ConsensusParamsKeyTable() params.KeyTable {
return params.NewKeyTable(
params.NewParamSetPair(
baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams,
),
params.NewParamSetPair(
baseapp.ParamStoreKeyEvidenceParams, abci.EvidenceParams{}, baseapp.ValidateEvidenceParams,
),
params.NewParamSetPair(
baseapp.ParamStoreKeyValidatorParams, abci.ValidatorParams{}, baseapp.ValidateValidatorParams,
),
)
}
+12
View File
@@ -0,0 +1,12 @@
/*
Package std defines all the common and standard inter-module Cosmos SDK types and definitions
modules and applications can depend on. These types and definitions serve as
convenient starting point and also to act as an example or template of how said
types and definitions can be overridden/redefined.
Typically these will be used in application-specific units of business logic. These
types and definitions are different from the types you may find in a "core" or "types"
package as those should be considered the defacto types to be used and are not
application-specific.
*/
package std