Merge PR #3119: Move all store keys into constants

* Move all store keys into constants
* Fix lint issue
* Add Pending.md
* QuerierKey -> QuerierRoute
This commit is contained in:
Jack Zampolin
2018-12-19 20:58:30 +01:00
committed by Christopher Goes
parent 5241c3c7c1
commit 14ebc65daf
56 changed files with 305 additions and 232 deletions
+3
View File
@@ -33,6 +33,9 @@ const (
runTxModeSimulate runTxMode = iota
// Deliver a transaction
runTxModeDeliver runTxMode = iota
// MainStoreKey is the string representation of the main store
MainStoreKey = "main"
)
// BaseApp reflects the ABCI application implementation.
+3 -3
View File
@@ -90,7 +90,7 @@ func TestLoadVersion(t *testing.T) {
app := NewBaseApp(name, logger, db, nil)
// make a cap key and mount the store
capKey := sdk.NewKVStoreKey("main")
capKey := sdk.NewKVStoreKey(MainStoreKey)
app.MountStores(capKey)
err := app.LoadLatestVersion(capKey) // needed to make stores non-nil
require.Nil(t, err)
@@ -160,7 +160,7 @@ func testChangeNameHelper(name string) func(*BaseApp) {
app := newBaseApp(t.Name())
// make a cap key and mount the store
capKey := sdk.NewKVStoreKey("main")
capKey := sdk.NewKVStoreKey(MainStoreKey)
app.MountStores(capKey)
err := app.LoadLatestVersion(capKey) // needed to make stores non-nil
require.Nil(t, err)
@@ -217,7 +217,7 @@ func TestInitChainer(t *testing.T) {
db := dbm.NewMemDB()
logger := defaultLogger()
app := NewBaseApp(name, logger, db, nil)
capKey := sdk.NewKVStoreKey("main")
capKey := sdk.NewKVStoreKey(MainStoreKey)
capKey2 := sdk.NewKVStoreKey("key2")
app.MountStores(capKey, capKey2)