Skip to content

Commit

Permalink
check nil in rootmulti as well
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed May 18, 2021
1 parent 845fa40 commit 79fa51f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,11 @@ func (rs *Store) GetStore(key types.StoreKey) types.Store {
// NOTE: The returned KVStore may be wrapped in an inter-block cache if it is
// set on the root store.
func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore {
store := rs.stores[key].(types.KVStore)
s := rs.stores[key]
if s == nil {
panic(fmt.Sprintf("store does not exist for key: %s", key.Name()))
}
store := s.(types.KVStore)

if rs.TracingEnabled() {
store = tracekv.NewStore(store, rs.traceWriter, rs.traceContext)
Expand Down

0 comments on commit 79fa51f

Please sign in to comment.