laconicd/app/test_common.go

21 lines
529 B
Go
Raw Normal View History

2018-11-28 22:19:22 +00:00
package app
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) {
db := dbm.NewMemDB()
capKey := sdk.NewKVStoreKey("capkey")
2018-11-28 22:19:22 +00:00
capKey2 := sdk.NewKVStoreKey("capkey2")
ms := store.NewCommitMultiStore(db)
2018-08-31 20:44:34 +00:00
ms.MountStoreWithDB(capKey, sdk.StoreTypeIAVL, db)
2018-11-28 22:19:22 +00:00
ms.MountStoreWithDB(capKey2, sdk.StoreTypeIAVL, db)
ms.LoadLatestVersion()
2018-08-31 20:44:34 +00:00
2018-11-28 22:19:22 +00:00
return ms, capKey, capKey2
}