| Index: impl/memory/datastore_data.go
|
| diff --git a/impl/memory/datastore_data.go b/impl/memory/datastore_data.go
|
| index ad8515ee62919e1cf7a84fe942870127170a4043..95d66fb831b7b65dab1d944b8b976ae2f0e58e1c 100644
|
| --- a/impl/memory/datastore_data.go
|
| +++ b/impl/memory/datastore_data.go
|
| @@ -193,8 +193,8 @@ func curVersion(ents memCollection, key []byte) int64 {
|
| pm, err := rpm(v)
|
| memoryCorruption(err)
|
|
|
| - pl, ok := pm["__version__"]
|
| - if ok && len(pl) > 0 && pl[0].Type() == ds.PTInt {
|
| + pl := pm.Slice("__version__")
|
| + if len(pl) > 0 && pl[0].Type() == ds.PTInt {
|
| return pl[0].Value().(int64)
|
| }
|
|
|
| @@ -210,7 +210,7 @@ func incrementLocked(ents memCollection, key []byte, amt int) int64 {
|
| }
|
| ret := curVersion(ents, key) + 1
|
| ents.Set(key, serialize.ToBytes(ds.PropertyMap{
|
| - "__version__": {ds.MkPropertyNI(ret + int64(amt-1))},
|
| + "__version__": ds.MkPropertyNI(ret + int64(amt-1)),
|
| }))
|
| return ret
|
| }
|
|
|