Add consensus params into Simulation (#6002)
* temporal commit * add random consensus params * make format * make random pass * remove comment * revert change * update ub key types * extract Evidence params from state * extract the random parameters from state * clean the code * update imports! * mispelled back * mispelled back * add misspelled command * update changelog * remove useless linter to avoid misspell * remove function * use tendermint constants Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
co-authored by
Alexander Bezobchuk
parent
71c62a432f
commit
65048683b5
@@ -1,6 +1,9 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
@@ -37,3 +40,14 @@ func DefaultGenesisState() GenesisState {
|
||||
Params: DefaultParams(),
|
||||
}
|
||||
}
|
||||
|
||||
// GetGenesisStateFromAppState returns x/staking GenesisState given raw application
|
||||
// genesis state.
|
||||
func GetGenesisStateFromAppState(cdc *codec.Codec, appState map[string]json.RawMessage) GenesisState {
|
||||
var genesisState GenesisState
|
||||
if appState[ModuleName] != nil {
|
||||
cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState)
|
||||
}
|
||||
|
||||
return genesisState
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user