Skip to content

Commit

Permalink
docs: Fix typo in adr-003-dynamic-capability-store.md (#19238)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim201212 authored Jan 25, 2024
1 parent bb58af8 commit 21b547e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/architecture/adr-003-dynamic-capability-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ It MUST be called before `InitialiseAndSeal`.

```go
func (ck CapabilityKeeper) ScopeToModule(moduleName string) ScopedCapabilityKeeper {
if k.sealed {
if ck.sealed {
panic("cannot scope to module via a sealed capability keeper")
}

if _, ok := k.scopedModules[moduleName]; ok {
if _, ok := ck.scopedModules[moduleName]; ok {
panic(fmt.Sprintf("cannot create multiple scoped keepers for the same module name: %s", moduleName))
}

k.scopedModules[moduleName] = struct{}{}
ck.scopedModules[moduleName] = struct{}{}

return ScopedKeeper{
cdc: k.cdc,
storeKey: k.storeKey,
memKey: k.memKey,
capMap: k.capMap,
cdc: ck.cdc,
storeKey: ck.storeKey,
memKey: ck.memKey,
capMap: ck.capMap,
module: moduleName,
}
}
Expand Down

0 comments on commit 21b547e

Please sign in to comment.