Skip to content

Commit

Permalink
fix: Add sims export/import test and fix (backport #23462) (#23464)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Peters <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2025
1 parent 4c47d8d commit 2fddc86
Show file tree
Hide file tree
Showing 17 changed files with 597 additions and 343 deletions.
3 changes: 3 additions & 0 deletions simapp/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ var (
SkipStoreKeys: []string{
authtxconfig.DepinjectModuleName,
validate.ModuleName,
genutiltypes.ModuleName,
runtime.ModuleName,
vestingtypes.ModuleName,
},
}),
},
Expand Down
15 changes: 9 additions & 6 deletions types/simulation/collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ func NewStoreDecoderFuncFromCollectionsSchema(schema collections.Schema) func(kv
if err != nil {
panic(err)
}
vAString, err := vc.Stringify(vA)
if err != nil {
panic(err)
vAString, vBString := "<nil>", "<nil>"
if vA != nil {
if vAString, err = vc.Stringify(vA); err != nil {
panic(err)
}
}
vBString, err := vc.Stringify(vB)
if err != nil {
panic(err)
if vB != nil {
if vBString, err = vc.Stringify(vB); err != nil {
panic(err)
}
}
return vAString + "\n" + vBString
}
Expand Down
1 change: 1 addition & 0 deletions x/accounts/defaults/lockup/v1/lockup.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ message Period {
];
}

// UnbondingEntries list of elements
message UnbondingEntries {
repeated UnbondingEntry entries = 1;
}
Expand Down
1 change: 0 additions & 1 deletion x/accounts/proto/cosmos/accounts/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ option go_package = "cosmossdk.io/x/accounts/v1";
import "google/protobuf/any.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/tx/v1beta1/tx.proto";
import "gogoproto/gogo.proto";

// Msg defines the Msg service for the x/accounts module.
Expand Down
92 changes: 45 additions & 47 deletions x/accounts/v1/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion x/mint/proto/cosmos/mint/v1beta1/mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ option go_package = "cosmossdk.io/x/mint/types";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
import "google/protobuf/any.proto";

// Minter represents the minting state.
message Minter {
Expand Down
64 changes: 31 additions & 33 deletions x/mint/types/mint.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/protocolpool/proto/cosmos/protocolpool/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ option go_package = "cosmossdk.io/x/protocolpool/types";

import "cosmos/protocolpool/v1/types.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";

// GenesisState defines the protocolpool module's genesis state.
Expand All @@ -29,6 +28,7 @@ message GenesisState {
Params params = 5;
}

// Distribution time with amount tuple
message Distribution {
// time at which this distribution was made, in order to distribute to non-expired funds only
// and funds that existed at that time. Because we don't distribute right away, we keep track
Expand Down
Loading

0 comments on commit 2fddc86

Please sign in to comment.