xyz.stratalab.consensus.models.SlotDataValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.consensus.models
object SlotDataValidator extends scalapb.validate.Validator[xyz.stratalab.consensus.models.SlotData] {
def validate(input: xyz.stratalab.consensus.models.SlotData): scalapb.validate.Result =
xyz.stratalab.consensus.models.SlotIdValidator.validate(input.slotId) &&
xyz.stratalab.consensus.models.SlotIdValidator.validate(input.parentSlotId) &&
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("SlotData.rho", input.rho, 64)) &&
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("SlotData.eta", input.eta, 32))
}