neo-go/pkg/consensus/change_view.go

20 lines
452 B
Go
Raw Normal View History

2019-11-08 15:40:21 +00:00
package consensus
import "github.com/CityOfZion/neo-go/pkg/io"
// changeView represents dBFT ChangeView message.
type changeView struct {
NewViewNumber byte
Timestamp uint32
}
// EncodeBinary implements io.Serializable interface.
func (c *changeView) EncodeBinary(w *io.BinWriter) {
w.WriteLE(c.Timestamp)
}
// DecodeBinary implements io.Serializable interface.
func (c *changeView) DecodeBinary(r *io.BinReader) {
r.ReadLE(&c.Timestamp)
}