From 60dfffc574a1f93ac32d836c5e08d2e1c3da5999 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 8 Feb 2021 10:52:53 +0300 Subject: [PATCH] manifest: remove no longer used Serializable interface It was used when manifests were saved into JSON. --- pkg/smartcontract/manifest/manifest.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/smartcontract/manifest/manifest.go b/pkg/smartcontract/manifest/manifest.go index a2c41c1fe..e9db635a3 100644 --- a/pkg/smartcontract/manifest/manifest.go +++ b/pkg/smartcontract/manifest/manifest.go @@ -5,7 +5,6 @@ import ( "errors" "math" - "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" ) @@ -122,26 +121,6 @@ func (m *Manifest) IsValid(hash util.Uint160) bool { return true } -// EncodeBinary implements io.Serializable. -func (m *Manifest) EncodeBinary(w *io.BinWriter) { - data, err := json.Marshal(m) - if err != nil { - w.Err = err - return - } - w.WriteVarBytes(data) -} - -// DecodeBinary implements io.Serializable. -func (m *Manifest) DecodeBinary(r *io.BinReader) { - data := r.ReadVarBytes(MaxManifestSize) - if r.Err != nil { - return - } else if err := json.Unmarshal(data, m); err != nil { - r.Err = err - } -} - // ToStackItem converts Manifest to stackitem.Item. func (m *Manifest) ToStackItem() (stackitem.Item, error) { groups := make([]stackitem.Item, len(m.Groups))