Interface NodeMessagePermissioningProvider
- 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 devp2p message is permitted.
A simple implementation can look like:
A simple implementation can look like:
context
.getService(PermissioningService.class)
.get()
.registerNodeMessagePermissioningProvider((destinationEnode, code) -> {
// Your logic here
return true;
});
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisMessagePermitted(EnodeURL destinationEnode, int code) Can be used to intercept messages before they are sent from besu.
-
Method Details
-
isMessagePermitted
Can be used to intercept messages before they are sent from besu.
Note: this will be called on every message!- Parameters:
destinationEnode- the enode you are about to send tocode- devp2p code for the message- Returns:
- if we can send the message to the peer
-