@@ -21,10 +21,13 @@ import (
21
21
"github.com/cosmos/cosmos-sdk/codec"
22
22
"github.com/cosmos/cosmos-sdk/store"
23
23
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
24
+ sdk "github.com/cosmos/cosmos-sdk/types"
24
25
"github.com/cosmos/cosmos-sdk/types/module"
25
26
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
26
27
"github.com/cosmos/cosmos-sdk/x/simulation"
27
28
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"
29
+
30
+ tax2gastypes "github.com/classic-terra/core/v3/x/tax2gas/types"
28
31
)
29
32
30
33
// SimAppChainID hardcoded chainID for simulation
@@ -142,16 +145,34 @@ func TestAppStateDeterminism(t *testing.T) {
142
145
simtestutil.EmptyAppOptions {}, emptyWasmOpts , interBlockCacheOpt (), fauxMerkleModeOpt (),
143
146
)
144
147
148
+ appGenState := app .DefaultGenesis ()
149
+ tax2gasGenState := tax2gastypes.GenesisState {}
150
+ err := app .AppCodec ().UnmarshalJSON (appGenState [tax2gastypes .ModuleName ], & tax2gasGenState )
151
+ require .NoError (t , err )
152
+
153
+ tax2gasGenState .Params = tax2gastypes.Params {
154
+ Enabled : true ,
155
+ GasPrices : sdk.DecCoins {
156
+ sdk .NewDecCoinFromDec ("stake" , sdk .NewDecWithPrec (0 , 3 )),
157
+ },
158
+ }
159
+ newGenState := tax2gasGenState
160
+ bz , err := app .AppCodec ().MarshalJSON (& newGenState )
161
+ require .NoError (t , err )
162
+
163
+ fmt .Println ("bz :" , string (bz ))
164
+ appGenState [tax2gastypes .ModuleName ] = bz
165
+
145
166
fmt .Printf (
146
167
"running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n " ,
147
168
config .Seed , i + 1 , numSeeds , j + 1 , numTimesToRunPerSeed ,
148
169
)
149
170
150
- _ , _ , err : = simulation .SimulateFromSeed (
171
+ _ , _ , err = simulation .SimulateFromSeed (
151
172
t ,
152
173
os .Stdout ,
153
174
app .BaseApp ,
154
- AppStateFn (app .AppCodec (), app .SimulationManager (), app . DefaultGenesis () ),
175
+ AppStateFn (app .AppCodec (), app .SimulationManager (), appGenState ),
155
176
simtypes .RandomAccounts , // Replace with own random account function if using keys other than secp256k1
156
177
simtestutil .SimulationOperations (app , app .AppCodec (), config ),
157
178
app .ModuleAccountAddrs (),
0 commit comments