@ -37,7 +37,7 @@ public class NodeLocalConfigPermissioningController implements NodePermissioning
private static final Logger LOG = LogManager . getLogger ( ) ;
private LocalPermissioningConfiguration configuration ;
private final List < EnodeURL > bootn odes;
private final List < EnodeURL > fixedN odes;
private final EnodeURL selfEnode ;
private final List < EnodeURL > nodesWhitelist = new ArrayList < > ( ) ;
private final WhitelistPersistor whitelistPersistor ;
@ -46,22 +46,22 @@ public class NodeLocalConfigPermissioningController implements NodePermissioning
public NodeLocalConfigPermissioningController (
final LocalPermissioningConfiguration permissioningConfiguration ,
final List < EnodeURL > bootn odes,
final List < EnodeURL > fixedN odes,
final EnodeURL selfEnode ) {
this (
permissioningConfiguration ,
bootn odes,
fixedN odes,
selfEnode ,
new WhitelistPersistor ( permissioningConfiguration . getNodePermissioningConfigFilePath ( ) ) ) ;
}
public NodeLocalConfigPermissioningController (
final LocalPermissioningConfiguration configuration ,
final List < EnodeURL > bootn odes,
final List < EnodeURL > fixedN odes,
final EnodeURL selfEnode ,
final WhitelistPersistor whitelistPersistor ) {
this . configuration = configuration ;
this . bootnodes = bootn odes;
this . fixedNodes = fixedN odes;
this . selfEnode = selfEnode ;
this . whitelistPersistor = whitelistPersistor ;
readNodesFromConfig ( configuration ) ;
@ -115,9 +115,9 @@ public class NodeLocalConfigPermissioningController implements NodePermissioning
final List < EnodeURL > peers =
enodeURLs . stream ( ) . map ( EnodeURL : : fromString ) . collect ( Collectors . toList ( ) ) ;
boolean anyBootnode = peers . stream ( ) . anyMatch ( bootn odes: : contains ) ;
boolean anyBootnode = peers . stream ( ) . anyMatch ( fixedN odes: : contains ) ;
if ( anyBootnode ) {
return new NodesWhitelistResult ( WhitelistOperationResult . ERROR_BOOT NODE_CANNOT_BE_REMOVED ) ;
return new NodesWhitelistResult ( WhitelistOperationResult . ERROR_FIXED_ NODE_CANNOT_BE_REMOVED ) ;
}
for ( EnodeURL peer : peers ) {