-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x/capability: Cap Initialization Fix (#9392)
(cherry picked from commit 3776793) # Conflicts: # x/ibc/applications/transfer/simulation/params.go
- Loading branch information
1 parent
d5b0f3a
commit 274a33d
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package simulation | ||
|
||
import ( | ||
"math/rand" | ||
|
||
gogotypes "github.com/gogo/protobuf/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/x/simulation" | ||
|
||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation" | ||
"github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" | ||
) | ||
|
||
// ParamChanges defines the parameters that can be modified by param change proposals | ||
// on the simulation | ||
func ParamChanges(r *rand.Rand) []simtypes.ParamChange { | ||
return []simtypes.ParamChange{ | ||
simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled), | ||
func(r *rand.Rand) string { | ||
sendEnabled := RadomEnabled(r) | ||
return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) | ||
}, | ||
), | ||
simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled), | ||
func(r *rand.Rand) string { | ||
receiveEnabled := RadomEnabled(r) | ||
return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) | ||
}, | ||
), | ||
} | ||
} |