neoneo-go/pkg/consensus/prepare_response.go
2019-11-13 17:27:25 +03:00

21 lines
528 B
Go

package consensus
import (
"github.com/CityOfZion/neo-go/pkg/io"
"github.com/CityOfZion/neo-go/pkg/util"
)
// prepareResponse represents dBFT PrepareResponse message.
type prepareResponse struct {
PreparationHash util.Uint256
}
// EncodeBinary implements io.Serializable interface.
func (p *prepareResponse) EncodeBinary(w *io.BinWriter) {
w.WriteBE(p.PreparationHash[:])
}
// DecodeBinary implements io.Serializable interface.
func (p *prepareResponse) DecodeBinary(r *io.BinReader) {
r.ReadBE(p.PreparationHash[:])
}