manifest: remove no longer used Serializable interface

It was used when manifests were saved into JSON.
This commit is contained in:
Roman Khimov 2021-02-08 10:52:53 +03:00
parent 1f98289f5d
commit 60dfffc574

View file

@ -5,7 +5,6 @@ import (
"errors" "errors"
"math" "math"
"github.com/nspcc-dev/neo-go/pkg/io"
"github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
) )
@ -122,26 +121,6 @@ func (m *Manifest) IsValid(hash util.Uint160) bool {
return true 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. // ToStackItem converts Manifest to stackitem.Item.
func (m *Manifest) ToStackItem() (stackitem.Item, error) { func (m *Manifest) ToStackItem() (stackitem.Item, error) {
groups := make([]stackitem.Item, len(m.Groups)) groups := make([]stackitem.Item, len(m.Groups))