Merge PR #4717: update x/slashing to match module spec

This commit is contained in:
Federico Kunze
2019-07-19 15:43:38 +02:00
committed by Alexander Bezobchuk
parent 72ce6df7b6
commit 52edb032ca
40 changed files with 567 additions and 495 deletions
+1
View File
@@ -25,6 +25,7 @@ const (
var (
// functions aliases
NewParamSetPair = subspace.NewParamSetPair
NewSubspace = subspace.NewSubspace
NewKeyTable = subspace.NewKeyTable
DefaultTestComponents = subspace.DefaultTestComponents
+8 -3
View File
@@ -1,15 +1,20 @@
package subspace
// Used for associating paramsubspace key and field of param structs
// ParamSetPair is used for associating paramsubspace key and field of param structs
type ParamSetPair struct {
Key []byte
Value interface{}
}
// Slice of KeyFieldPair
// NewParamSetPair creates a new ParamSetPair instance
func NewParamSetPair(key []byte, value interface{}) ParamSetPair {
return ParamSetPair{key, value}
}
// ParamSetPairs Slice of KeyFieldPair
type ParamSetPairs []ParamSetPair
// Interface for structs containing parameters for a module
// ParamSet defines an interface for structs containing parameters for a module
type ParamSet interface {
ParamSetPairs() ParamSetPairs
}