Skip to content

Commit

Permalink
x/staking: skip HistoricalInfo in simulations (cosmos#5949)
Browse files Browse the repository at this point in the history
* x/staking: import and export HistoricalInfo

* staking/types: add HistoricalInfo to GenesisState

* changelog

* add staking module to app BeginBlockers

* remove JSON files

* address comments from review

* add HistoricalInfoKey to skipped prefixes

* fix DiffKVStores

* rm JSON
  • Loading branch information
fedekunze committed Apr 7, 2020
1 parent 658cd7e commit fb01747
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func NewSimApp(
// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
// CanWithdrawInvariant invariant.
app.mm.SetOrderBeginBlockers(upgrade.ModuleName, mint.ModuleName, distr.ModuleName, slashing.ModuleName, evidence.ModuleName)
app.mm.SetOrderBeginBlockers(upgrade.ModuleName, mint.ModuleName, distr.ModuleName, slashing.ModuleName, evidence.ModuleName, staking.ModuleName)
app.mm.SetOrderEndBlockers(crisis.ModuleName, gov.ModuleName, staking.ModuleName)

// NOTE: The genutils moodule must occur after staking so that pools are
Expand Down
1 change: 1 addition & 0 deletions sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func TestAppImportExport(t *testing.T) {
{app.keys[staking.StoreKey], newApp.keys[staking.StoreKey],
[][]byte{
staking.UnbondingQueueKey, staking.RedelegationQueueKey, staking.ValidatorQueueKey,
staking.HistoricalInfoKey,
}}, // ordering may change but it doesn't matter
{app.keys[slashing.StoreKey], newApp.keys[slashing.StoreKey], [][]byte{}},
{app.keys[mint.StoreKey], newApp.keys[mint.StoreKey], [][]byte{}},
Expand Down

0 comments on commit fb01747

Please sign in to comment.