func (op *obcSieve) validate(rawReq []byte) error {
	req := &SievePbftMessage{}
	err := proto.Unmarshal(rawReq, req)
	if err != nil {
		return err
	}

	if vset := req.GetVerifySet(); vset != nil {
		return op.validateVerifySet(vset)
	} else if flush := req.GetFlush(); flush != nil {
		return op.validateFlush(flush)
	} else {
		return fmt.Errorf("Invalid pbft request")
	}
}
// validate checks whether the request is valid syntactically
validate checks whether the request is valid syntactically
// validate checks whether the request is valid syntactically
func (op *obcSieve) validate(rawReq []byte) error {
	req := &SievePbftMessage{}
	err := proto.Unmarshal(rawReq, req)
	if err != nil {
		return err
	}
	if vset := req.GetVerifySet(); vset != nil {
		return op.validateVerifySet(vset)
	} else if flush := req.GetFlush(); flush != nil {
		return op.validateFlush(flush)
	} else {
		return fmt.Errorf("Invalid pbft request")
	}
}
func ( op * obcSieve ) validate ( rawReq [ ] byte ) error { req := & SievePbftMessage { } err := proto . Unmarshal ( rawReq , req ) if err != nil { return err } if vset := req . GetVerifySet ( ) ; vset != nil { return op . validateVerifySet ( vset ) } else if flush := req . GetFlush ( ) ; flush != nil { return op . validateFlush ( flush ) } else { return fmt . Errorf ( " " ) } }
validate checks whether the request is valid syntactically
validate checks whether the request is valid syntactically