2019-05-18 01:42:24 -07:00
|
|
|
package simapp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
2019-06-08 13:55:47 -07:00
|
|
|
dbm "github.com/tendermint/tendermint/libs/db"
|
2019-05-18 01:42:24 -07:00
|
|
|
"github.com/tendermint/tendermint/libs/log"
|
|
|
|
|
|
|
|
bam "github.com/cosmos/cosmos-sdk/baseapp"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/staking"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewSimAppUNSAFE is used for debugging purposes only.
|
|
|
|
//
|
|
|
|
// NOTE: to not use this function with non-test code
|
|
|
|
func NewSimAppUNSAFE(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
|
|
|
|
invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp),
|
|
|
|
) (gapp *SimApp, keyMain, keyStaking *sdk.KVStoreKey, stakingKeeper staking.Keeper) {
|
|
|
|
|
|
|
|
gapp = NewSimApp(logger, db, traceStore, loadLatest, invCheckPeriod, baseAppOptions...)
|
|
|
|
return gapp, gapp.keyMain, gapp.keyStaking, gapp.stakingKeeper
|
|
|
|
}
|