diff --git a/container/container_contract.go b/container/container_contract.go index b10b10c..95d91ad 100644 --- a/container/container_contract.go +++ b/container/container_contract.go @@ -744,10 +744,9 @@ func estimationKey(epoch int, cid []byte, key interop.PublicKey) []byte { func getContainerSizeEstimation(ctx storage.Context, key, cid []byte) containerSizes { var estimations []estimation - it := storage.Find(ctx, key, storage.ValuesOnly) + it := storage.Find(ctx, key, storage.ValuesOnly|storage.DeserializeValues) for iterator.Next(it) { - rawEstimation := iterator.Value(it).([]byte) - est := std.Deserialize(rawEstimation).(estimation) + est := iterator.Value(it).(estimation) estimations = append(estimations, est) } diff --git a/netmap/netmap_contract.go b/netmap/netmap_contract.go index f93ecc0..f6eae40 100644 --- a/netmap/netmap_contract.go +++ b/netmap/netmap_contract.go @@ -537,10 +537,9 @@ func filterNetmap(ctx storage.Context, st nodeState) []storageNode { func getNetmapNodes(ctx storage.Context) []netmapNode { result := []netmapNode{} - it := storage.Find(ctx, candidatePrefix, storage.ValuesOnly) + it := storage.Find(ctx, candidatePrefix, storage.ValuesOnly|storage.DeserializeValues) for iterator.Next(it) { - rawNode := iterator.Value(it).([]byte) - node := std.Deserialize(rawNode).(netmapNode) + node := iterator.Value(it).(netmapNode) result = append(result, node) }