neo-go/pkg/core/state/storage_item.go
Evgeniy Stratonikov 55698d0426 dao: use raw state.StorageItem instead of pointer
It is now a slice, there is no need for additional indirection.
2021-03-09 12:11:25 +03:00

18 lines
415 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 []byte
// EncodeBinary implements Serializable interface.
func (si *StorageItem) EncodeBinary(w *io.BinWriter) {
w.WriteVarBytes(*si)
}
// DecodeBinary implements Serializable interface.
func (si *StorageItem) DecodeBinary(r *io.BinReader) {
*si = r.ReadVarBytes()
}