mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 13:58:05 +00:00
08cc04c3d5
part of #904
26 lines
653 B
Go
26 lines
653 B
Go
package payload
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
// MaxSize is maximum payload size in decompressed form.
|
|
const MaxSize = 0x02000000
|
|
|
|
// Payload is anything that can be binary encoded/decoded.
|
|
type Payload interface {
|
|
io.Serializable
|
|
}
|
|
|
|
// NullPayload is a dummy payload with no fields.
|
|
type NullPayload struct {
|
|
}
|
|
|
|
// NewNullPayload returns zero-sized stub payload.
|
|
func NewNullPayload() NullPayload {
|
|
return NullPayload{}
|
|
}
|
|
|
|
// DecodeBinary implements Serializable interface.
|
|
func (p NullPayload) DecodeBinary(r *io.BinReader) {}
|
|
|
|
// EncodeBinary implements Serializable interface.
|
|
func (p NullPayload) EncodeBinary(w *io.BinWriter) {}
|