laconicd/handlers/test_common.go

19 lines
419 B
Go
Raw Normal View History

package handlers
import (
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
dbm "github.com/tendermint/tendermint/libs/db"
)
2018-08-31 20:44:34 +00:00
func createTestMultiStore() (sdk.MultiStore, *sdk.KVStoreKey) {
db := dbm.NewMemDB()
capKey := sdk.NewKVStoreKey("capkey")
ms := store.NewCommitMultiStore(db)
2018-08-31 20:44:34 +00:00
ms.MountStoreWithDB(capKey, sdk.StoreTypeIAVL, db)
ms.LoadLatestVersion()
2018-08-31 20:44:34 +00:00
return ms, capKey
}