2018-08-14 01:02:21 +00:00
|
|
|
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) {
|
2018-08-14 01:02:21 +00:00
|
|
|
db := dbm.NewMemDB()
|
|
|
|
capKey := sdk.NewKVStoreKey("capkey")
|
|
|
|
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)
|
|
|
|
ms.LoadLatestVersion()
|
2018-08-31 20:44:34 +00:00
|
|
|
|
2018-08-14 01:02:21 +00:00
|
|
|
return ms, capKey
|
|
|
|
}
|