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.

@FunctionalInterface public interface NodeMessagePermissioningProvider
Allows you to register a provider that will decide if a devp2p message is permitted.

A simple implementation can look like:
context
   .getService(PermissioningService.class)
   .get()
   .registerNodeMessagePermissioningProvider((destinationEnode, code) -> {
       // Your logic here
       return true;
   });
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isMessagePermitted(EnodeURL destinationEnode, int code)
    Can be used to intercept messages before they are sent from besu.
  • Method Details

    • isMessagePermitted

      boolean isMessagePermitted(EnodeURL destinationEnode, int code)
      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 to
      code - devp2p code for the message
      Returns:
      if we can send the message to the peer