-
Notifications
You must be signed in to change notification settings - Fork 0
/
percosis_helper.go
43 lines (35 loc) · 1.12 KB
/
percosis_helper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package simapp
import (
"github.com/tendermint/tendermint/libs/log"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/types/simulation"
db "github.com/tendermint/tm-db"
simexec "github.com/percosis-labs/percosis/v16/simulation/executor"
"github.com/percosis-labs/percosis/v16/app"
"github.com/percosis-labs/percosis/v16/simulation/simtypes"
)
func PercosisAppCreator(logger log.Logger, db db.DB) simtypes.AppCreator {
return func(homepath string, legacyInvariantPeriod uint, baseappOptions ...func(*baseapp.BaseApp)) simtypes.App {
return app.NewPercosisApp(
logger,
db,
nil,
true, // load latest
map[int64]bool{},
homepath,
legacyInvariantPeriod,
emptyAppOptions{},
app.EmptyWasmOpts,
baseappOptions...)
}
}
var PercosisInitFns = simexec.InitFunctions{
RandomAccountFn: simexec.WrapRandAccFnForResampling(simulation.RandomAccounts, app.ModuleAccountAddrs()),
InitChainFn: InitChainFn(),
}
// EmptyAppOptions is a stub implementing AppOptions
type emptyAppOptions struct{}
// Get implements AppOptions
func (ao emptyAppOptions) Get(o string) interface{} {
return nil
}