Interface TransactionValidationRule

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TransactionValidationRule
Allows you to implement a custom transaction validator
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(org.hyperledger.besu.datatypes.Transaction transaction)
    Can be used to validate transactions according to custom needs
  • Method Details

    • validate

      Optional<String> validate(org.hyperledger.besu.datatypes.Transaction transaction)
      Can be used to validate transactions according to custom needs
      Parameters:
      transaction - current transaction to validate
      Returns:
      an optional reason if the transaction is invalid or empty if it is valid