From decff2bfb923597b556a18fc2654c58db69c0b3e Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 30 Nov 2021 22:37:56 +0300 Subject: [PATCH] stackitem: simplify extracting value from map Going through interfaces doesn't make it faster. --- pkg/vm/stackitem/serialization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vm/stackitem/serialization.go b/pkg/vm/stackitem/serialization.go index e11da49c1..50c5a5f2e 100644 --- a/pkg/vm/stackitem/serialization.go +++ b/pkg/vm/stackitem/serialization.go @@ -152,7 +152,7 @@ func (w *serContext) serialize(item Item) error { case *Map: w.seen[item] = sliceNoPointer{} - elems := t.Value().([]MapElement) + elems := t.value w.data = append(w.data, byte(MapT)) w.appendVarUint(uint64(len(elems))) for i := range elems {