neo-go/pkg/core/transaction/state.go
Evgenii Stratonikov b16e56a47b io: refactor BinReader.ReadArray()
Make it accept arbitrary slice pointer.
2019-11-14 14:19:58 +03:00

20 lines
441 B
Go

package transaction
import (
"github.com/CityOfZion/neo-go/pkg/io"
)
// StateTX represents a state transaction.
type StateTX struct {
Descriptors []*StateDescriptor
}
// DecodeBinary implements Serializable interface.
func (tx *StateTX) DecodeBinary(r *io.BinReader) {
r.ReadArray(&tx.Descriptors)
}
// EncodeBinary implements Serializable interface.
func (tx *StateTX) EncodeBinary(w *io.BinWriter) {
w.WriteArray(tx.Descriptors)
}