From 7e7ce7f19f0033a9d22b90600dcd45890bf8e69b Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 7 Feb 2020 11:53:53 +0300 Subject: [PATCH] vm: rephrase serialization errors Seeing some blockQueue: failed adding block into the blockchain {"error": "failed to store notifications: not supported", "blockHeight": 713984, "nextIndex": 713985} in logs is not very helpful. --- pkg/vm/serialization.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/vm/serialization.go b/pkg/vm/serialization.go index 245102f20..af2da3152 100644 --- a/pkg/vm/serialization.go +++ b/pkg/vm/serialization.go @@ -35,7 +35,7 @@ func EncodeBinaryStackItem(item StackItem, w *io.BinWriter) { func serializeItemTo(item StackItem, w *io.BinWriter, seen map[StackItem]bool) { if seen[item] { - w.Err = errors.New("recursive structures are not supported") + w.Err = errors.New("recursive structures can't be serialized") return } @@ -50,7 +50,7 @@ func serializeItemTo(item StackItem, w *io.BinWriter, seen map[StackItem]bool) { w.WriteBytes([]byte{byte(integerT)}) w.WriteVarBytes(IntToBytes(t.value)) case *InteropItem: - w.Err = errors.New("not supported") + w.Err = errors.New("interop item can't be serialized") case *ArrayItem, *StructItem: seen[item] = true