Interface TransactionPermissioningProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Allows you to register a provider that will decide if a transaction is permitted.
A simple implementation can look like:
A simple implementation can look like:
context
.getService(PermissioningService.class)
.get()
.registerTransactionPermissioningProvider((tx) -> {
// Your logic here
return true;
});
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisPermitted(org.hyperledger.besu.datatypes.Transaction transaction) Can be used to filter transactions according to an arbitrary criteria.
-
Method Details
-
isPermitted
boolean isPermitted(org.hyperledger.besu.datatypes.Transaction transaction) Can be used to filter transactions according to an arbitrary criteria. Registered providers are consulted as part of transaction validation, so rejecting a transaction keeps it out of the transaction pool and causes it to fail block-level transaction validation.- Parameters:
transaction- the transaction to check- Returns:
- whether the transaction is permitted
-