xyz.stratalab.node.services.SynchronizationTraversalResValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.node.services
object SynchronizationTraversalResValidator extends scalapb.validate.Validator[xyz.stratalab.node.services.SynchronizationTraversalRes] {
def validate(input: xyz.stratalab.node.services.SynchronizationTraversalRes): scalapb.validate.Result =
scalapb.validate.Result.optional(input.status.applied) { _value =>
xyz.stratalab.consensus.models.BlockIdValidator.validate(_value)
} &&
scalapb.validate.Result.optional(input.status.unapplied) { _value =>
xyz.stratalab.consensus.models.BlockIdValidator.validate(_value)
}
}