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:
co-authored by
mergify[bot]
Alex | Interchain Labs
parent
5254d57c5b
commit
7827aee97b
+14
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user