neo-go/pkg/core/transaction/reserved.go
Elizaveta Chichindaeva 28908aa3cf [#2442] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00

24 lines
543 B
Go

package transaction
import (
"github.com/nspcc-dev/neo-go/pkg/io"
)
// Reserved represents an attribute for experimental or private usage.
type Reserved struct {
Value []byte
}
// DecodeBinary implements the io.Serializable interface.
func (e *Reserved) DecodeBinary(br *io.BinReader) {
e.Value = br.ReadVarBytes()
}
// EncodeBinary implements the io.Serializable interface.
func (e *Reserved) EncodeBinary(w *io.BinWriter) {
w.WriteVarBytes(e.Value)
}
func (e *Reserved) toJSONMap(m map[string]interface{}) {
m["value"] = e.Value
}