xyz.stratalab.node.models.FullBlockBodyValidator.scala Maven / Gradle / Ivy
The newest version!
package xyz.stratalab.node.models
object FullBlockBodyValidator extends scalapb.validate.Validator[xyz.stratalab.node.models.FullBlockBody] {
def validate(input: xyz.stratalab.node.models.FullBlockBody): scalapb.validate.Result =
scalapb.validate.Result.repeated(input.transactions.iterator) { _value =>
xyz.stratalab.sdk.models.transaction.IoTransactionValidator.validate(_value)
} &&
scalapb.validate.Result.optional(input.rewardTransaction) { _value =>
xyz.stratalab.sdk.models.transaction.IoTransactionValidator.validate(_value)
}
}