public static void areAllNodesInAllowlist(
      final Collection<EnodeURL> nodeURIs,
      final LocalPermissioningConfiguration permissioningConfiguration)
      throws Exception {

    if (permissioningConfiguration.isNodeAllowlistEnabled() && nodeURIs != null) {
      final List<URI> allowlistNodesWithoutQueryParam =
          permissioningConfiguration.getNodeAllowlist().stream()
              .map(EnodeURL::toURIWithoutDiscoveryPort)
              .collect(toList());

      final List<URI> nodeURIsNotInAllowlist =
          nodeURIs.stream()
              .map(EnodeURL::toURIWithoutDiscoveryPort)
              .filter(uri -> !allowlistNodesWithoutQueryParam.contains(uri))
              .collect(toList());

      if (!nodeURIsNotInAllowlist.isEmpty()) {
        throw new Exception(
            "Specified node(s) not in nodes-allowlist " + enodesAsStrings(nodeURIsNotInAllowlist));
      }
    }
  }
Check if all nodes are in allowlist.

@param nodeURIs the node URIs
@param permissioningConfiguration the permissioning configuration
@throws Exception In case of nodes are not in allow list
app/src/main/java/org/hyperledger/besu/util/PermissioningConfigurationValidator.java