dont mount multiple stores while its broken

This commit is contained in:
Ethan Buchman 2018-03-01 02:02:29 -05:00
parent 2047abc8bc
commit cba7379f78
3 changed files with 11 additions and 6 deletions

View File

@ -24,6 +24,7 @@ BUG FIXES
* [baseapp] Fix panic on app restart
* [baseapp] InitChain does not call Commit
* [basecoin] Remove IBCStore because mounting multiple stores is currently broken
## 0.10.0 (February 20, 2017)

View File

@ -150,10 +150,12 @@ func TestInitChainer(t *testing.T) {
name := t.Name()
app := NewBaseApp(name, logger, db)
// make a cap key and mount the store
// make cap keys and mount the stores
// NOTE/TODO: mounting multiple stores is broken
// see https://github.com/cosmos/cosmos-sdk/issues/532
capKey := sdk.NewKVStoreKey("main")
capKey2 := sdk.NewKVStoreKey("key2")
app.MountStoresIAVL(capKey, capKey2)
// capKey2 := sdk.NewKVStoreKey("key2")
app.MountStoresIAVL(capKey) // , capKey2)
err := app.LoadLatestVersion(capKey) // needed to make stores non-nil
assert.Nil(t, err)
@ -186,8 +188,8 @@ func TestInitChainer(t *testing.T) {
// reload app
app = NewBaseApp(name, logger, db)
capKey = sdk.NewKVStoreKey("main")
capKey2 = sdk.NewKVStoreKey("key2")
app.MountStoresIAVL(capKey, capKey2)
// capKey2 = sdk.NewKVStoreKey("key2") // TODO
app.MountStoresIAVL(capKey) //, capKey2)
err = app.LoadLatestVersion(capKey) // needed to make stores non-nil
assert.Nil(t, err)
app.SetInitChainer(initChainer)

View File

@ -60,7 +60,9 @@ func NewBasecoinApp(logger log.Logger, db dbm.DB) *BasecoinApp {
// initialize BaseApp
app.SetTxDecoder(app.txDecoder)
app.SetInitChainer(app.initChainer)
app.MountStoresIAVL(app.capKeyMainStore, app.capKeyIBCStore)
// TODO: mounting multiple stores is broken
// https://github.com/cosmos/cosmos-sdk/issues/532
app.MountStoresIAVL(app.capKeyMainStore) // , app.capKeyIBCStore)
app.SetAnteHandler(auth.NewAnteHandler(app.accountMapper))
err := app.LoadLatestVersion(app.capKeyMainStore)
if err != nil {