2020-10-14 16:07:16 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NotValidBefore represents attribute with the height transaction is not valid before.
|
|
|
|
type NotValidBefore struct {
|
|
|
|
Height uint32 `json:"height"`
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// DecodeBinary implements the io.Serializable interface.
|
2020-10-14 16:07:16 +00:00
|
|
|
func (n *NotValidBefore) DecodeBinary(br *io.BinReader) {
|
2022-06-01 11:25:30 +00:00
|
|
|
n.Height = br.ReadU32LE()
|
2020-10-14 16:07:16 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// EncodeBinary implements the io.Serializable interface.
|
2020-10-14 16:07:16 +00:00
|
|
|
func (n *NotValidBefore) EncodeBinary(w *io.BinWriter) {
|
2022-06-01 11:25:30 +00:00
|
|
|
w.WriteU32LE(n.Height)
|
2020-10-14 16:07:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (n *NotValidBefore) toJSONMap(m map[string]interface{}) {
|
|
|
|
m["height"] = n.Height
|
|
|
|
}
|