neo-go/pkg/core/state/storage_item.go
2021-03-09 11:59:08 +03:00

20 lines
443 B
Go

package state
import (
"github.com/nspcc-dev/neo-go/pkg/io"
)
// StorageItem is the value to be stored with read-only flag.
type StorageItem struct {
Value []byte
}
// EncodeBinary implements Serializable interface.
func (si *StorageItem) EncodeBinary(w *io.BinWriter) {
w.WriteVarBytes(si.Value)
}
// DecodeBinary implements Serializable interface.
func (si *StorageItem) DecodeBinary(r *io.BinReader) {
si.Value = r.ReadVarBytes()
}