mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
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.
This commit is contained in:
parent
e0008436eb
commit
7e7ce7f19f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue