xyz.stratalab.consensus.models.ProtocolVersionValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.consensus.models
object ProtocolVersionValidator extends scalapb.validate.Validator[xyz.stratalab.consensus.models.ProtocolVersion] {
def validate(input: xyz.stratalab.consensus.models.ProtocolVersion): scalapb.validate.Result =
scalapb.validate.ComparativeValidation.greaterThanOrEqual("ProtocolVersion.firstDigit", input.firstDigit, 0) &&
scalapb.validate.ComparativeValidation.greaterThanOrEqual("ProtocolVersion.secondDigit", input.secondDigit, 0) &&
scalapb.validate.ComparativeValidation.greaterThanOrEqual("ProtocolVersion.thirdDigit", input.thirdDigit, 0)
}