@@ -75,15 +75,7 @@ func (s *Subspace) kvStore(ctx sdk.Context) sdk.KVStore {
75
75
// this function can be called concurrently so we should not call append on s.name directly
76
76
name := make ([]byte , len (s .name ))
77
77
copy (name , s .name )
78
- return prefix .NewStore (ctx .KVStore (s .key ), append (name , '/' ))
79
- }
80
-
81
- // Returns a transient store for modification
82
- func (s * Subspace ) transientStore (ctx sdk.Context ) sdk.KVStore {
83
- // this function can be called concurrently so we should not call append on s.name directly
84
- name := make ([]byte , len (s .name ))
85
- copy (name , s .name )
86
- return prefix .NewStore (ctx .TransientStore (s .tkey ), append (name , '/' ))
78
+ return prefix .NewStore (ctx .MultiStore ().GetKVStore (s .key ), append (name , '/' ))
87
79
}
88
80
89
81
// Validate attempts to validate a parameter value by its key. If the key is not
@@ -156,13 +148,6 @@ func (s *Subspace) Has(ctx sdk.Context, key []byte) bool {
156
148
return store .Has (key )
157
149
}
158
150
159
- // Modified returns true if the parameter key is set in the Subspace's transient
160
- // KVStore.
161
- func (s * Subspace ) Modified (ctx sdk.Context , key []byte ) bool {
162
- tstore := s .transientStore (ctx )
163
- return tstore .Has (key )
164
- }
165
-
166
151
// checkType verifies that the provided key and value are comptable and registered.
167
152
func (s * Subspace ) checkType (key []byte , value interface {}) {
168
153
attr , ok := s .table .m [string (key )]
@@ -258,10 +243,6 @@ func (s *Subspace) Set(ctx sdk.Context, key []byte, value interface{}) {
258
243
}
259
244
260
245
store .Set (key , bz )
261
-
262
- tstore := s .transientStore (ctx )
263
- tstore .Set (key , []byte {})
264
-
265
246
s .cacheValue (key , value )
266
247
}
267
248
@@ -348,11 +329,6 @@ func (ros ReadOnlySubspace) Has(ctx sdk.Context, key []byte) bool {
348
329
return ros .s .Has (ctx , key )
349
330
}
350
331
351
- // Modified delegates a read-only Modified call to the Subspace.
352
- func (ros ReadOnlySubspace ) Modified (ctx sdk.Context , key []byte ) bool {
353
- return ros .s .Modified (ctx , key )
354
- }
355
-
356
332
// Name delegates a read-only Name call to the Subspace.
357
333
func (ros ReadOnlySubspace ) Name () string {
358
334
return ros .s .Name ()
0 commit comments