forked from TrueCloudLab/neoneo-go
manifest: remove no longer used Serializable interface
It was used when manifests were saved into JSON.
This commit is contained in:
parent
1f98289f5d
commit
60dfffc574
1 changed files with 0 additions and 21 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue