xyz.stratalab.node.models.BlockBodyValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.node.models
object BlockBodyValidator extends scalapb.validate.Validator[xyz.stratalab.node.models.BlockBody] {
def validate(input: xyz.stratalab.node.models.BlockBody): scalapb.validate.Result =
scalapb.validate.Result.repeated(input.transactionIds.iterator) { _value =>
xyz.stratalab.sdk.models.TransactionIdValidator.validate(_value)
} &&
scalapb.validate.Result.optional(input.rewardTransactionId) { _value =>
xyz.stratalab.sdk.models.TransactionIdValidator.validate(_value)
}
}