Skip to content

Commit

Permalink
chore(cachemulti): no need to deep copy store keys
Browse files Browse the repository at this point in the history
  • Loading branch information
GAtom22 committed Jul 30, 2024
1 parent 6e4084b commit 8277a18
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions store/cachemulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,11 @@ func (cms Store) Copy() types.CacheMultiStore {
}
}

// Deep copy the keys map
newKeys := make(map[string]types.StoreKey, len(cms.keys))
for key, value := range cms.keys {
newKeys[key] = value
}

// Create new Store with copied values
newStore := Store{
db: newDB,
stores: newStores,
keys: newKeys,
keys: cms.keys,
traceWriter: cms.traceWriter,
traceContext: cms.traceContext,
}
Expand Down

0 comments on commit 8277a18

Please sign in to comment.