Skip to content

Commit

Permalink
Add RegisteredConsumerRewardDenoms to rapid test
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Sep 20, 2023
1 parent 55d2686 commit 5841fce
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions tests/e2e/state_rapid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,31 @@ func GetChainStateGen() *rapid.Generator[ChainState] {
providerKeys := GetProviderKeysGen().Draw(t, "ProviderKeys")
consumerChainQueueSizes := GetConsumerChainQueueSizesGen().Draw(t, "ConsumerChainQueueSizes")
globalSlashQueueSize := rapid.Uint().Draw(t, "GlobalSlashQueueSize")
registeredConsumerRewardDenoms := GetRegisteredConsumerRewardDenomsGen().Draw(t, "RegisteredConsumerRewardDenoms")

return ChainState{
ValBalances: &valBalances,
Proposals: &proposals,
ValPowers: &valPowers,
RepresentativePowers: &representativePowers,
Params: &params,
Rewards: &rewards,
ConsumerChains: &consumerChains,
AssignedKeys: &assignedKeys,
ProviderKeys: &providerKeys,
ConsumerChainQueueSizes: &consumerChainQueueSizes,
GlobalSlashQueueSize: &globalSlashQueueSize,
ValBalances: &valBalances,
Proposals: &proposals,
ValPowers: &valPowers,
RepresentativePowers: &representativePowers,
Params: &params,
Rewards: &rewards,
ConsumerChains: &consumerChains,
AssignedKeys: &assignedKeys,
ProviderKeys: &providerKeys,
ConsumerChainQueueSizes: &consumerChainQueueSizes,
GlobalSlashQueueSize: &globalSlashQueueSize,
RegisteredConsumerRewardDenoms: &registeredConsumerRewardDenoms,
}
})
}

func GetRegisteredConsumerRewardDenomsGen() *rapid.Generator[[]string] {
return rapid.Custom(func(t *rapid.T) []string {
return rapid.SliceOf(rapid.String()).Draw(t, "RegisteredConsumerRewardDenoms")
})
}

func GetConsumerChainQueueSizesGen() *rapid.Generator[map[ChainID]uint] {
return rapid.Custom(func(t *rapid.T) map[ChainID]uint {
return rapid.MapOf(GetChainIDGen(), rapid.Uint()).Draw(t, "ConsumerChainQueueSizes")
Expand Down

0 comments on commit 5841fce

Please sign in to comment.