Skip to content

Commit

Permalink
clarify namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Mar 10, 2022
1 parent 2d17a15 commit ba63cc3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ Currently, a module can access a store only through `sdk.Context`. We add the fo

```
type StoreAccess inteface {
KVStore(key []byte) KVStore // the existing method in sdk.Context, reads and writes to combined store (SS & SC) in combined namespace.
KVStore(key []byte) KVStore // the existing method in sdk.Context, reads and writes both to SS & SC stores in a combined namespace.
SCStore(key []byte) KVStore // reads and writes only to the SC in reserved SC namespace
SSStore(key []byte) KVStore // reads and writes only to the SS in reserved SS namespace
}
```

`KVStore`, `SCStore` an `SSStore` will operate in a distinct namespace and will be registered as a separate store in the MultiStore object. So, the records in each store will not collide (Eg: `KVStore(a).Set(k, v)` won't collide with `SSStore(a).Set(k, v)`).

The `KVStore(key)` will provide an access to the combined `SS` and `SC` store:

- `Get` will return `SS` value
Expand Down

0 comments on commit ba63cc3

Please sign in to comment.