fix(sims): Minor fixes (#24095)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
Alexander Peters
2025-03-25 17:45:55 +00:00
committed by GitHub
co-authored by mergify[bot] Alex | Interchain Labs
parent 5254d57c5b
commit 7827aee97b
7 changed files with 53 additions and 36 deletions
+14 -1
View File
@@ -180,7 +180,7 @@ func TestAppStateDeterminism(t *testing.T) {
"streaming.abci.stop-node-on-err": true,
}
others := appOpts
appOpts = sims.AppOptionsFn(func(k string) any {
appOpts = appOptionsFn(func(k string) any {
if v, ok := m[k]; ok {
return v
}
@@ -262,6 +262,19 @@ func AssertEqualStores(t *testing.T, app, newApp ComparableStoreApp, storeDecode
}
}
// appOptionsFn is an adapter to the single method AppOptions interface
type appOptionsFn func(string) any
func (f appOptionsFn) Get(k string) any {
return f(k)
}
// FauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of
// an IAVLStore for faster simulation speed.
func FauxMerkleModeOpt(bapp *baseapp.BaseApp) {
bapp.SetFauxMerkleMode()
}
func FuzzFullAppSimulation(f *testing.F) {
f.Fuzz(func(t *testing.T, rawSeed []byte) {
if len(rawSeed) < 8 {