2018-11-28 22:19:22 +00:00
|
|
|
package app
|
2018-08-14 01:02:21 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/store"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
dbm "github.com/tendermint/tendermint/libs/db"
|
|
|
|
)
|
|
|
|
|
2018-11-28 22:19:22 +00:00
|
|
|
func setupMultiStore() (sdk.MultiStore, *sdk.KVStoreKey, *sdk.KVStoreKey) {
|
2018-08-14 01:02:21 +00:00
|
|
|
db := dbm.NewMemDB()
|
|
|
|
capKey := sdk.NewKVStoreKey("capkey")
|
2018-11-28 22:19:22 +00:00
|
|
|
capKey2 := sdk.NewKVStoreKey("capkey2")
|
2018-08-14 01:02:21 +00:00
|
|
|
ms := store.NewCommitMultiStore(db)
|
2018-08-31 20:44:34 +00:00
|
|
|
|
2018-08-14 01:02:21 +00:00
|
|
|
ms.MountStoreWithDB(capKey, sdk.StoreTypeIAVL, db)
|
2018-11-28 22:19:22 +00:00
|
|
|
ms.MountStoreWithDB(capKey2, sdk.StoreTypeIAVL, db)
|
2018-08-14 01:02:21 +00:00
|
|
|
ms.LoadLatestVersion()
|
2018-08-31 20:44:34 +00:00
|
|
|
|
2018-11-28 22:19:22 +00:00
|
|
|
return ms, capKey, capKey2
|
2018-08-14 01:02:21 +00:00
|
|
|
}
|