Skip to content

Commit

Permalink
Add privacy and permissioning services to thread plugin context (hype…
Browse files Browse the repository at this point in the history
…rledger#6711)

Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: MASDXI <[email protected]>
  • Loading branch information
Gabriel-Trintinalia authored and MASDXI committed Mar 13, 2024
1 parent 91c4de5 commit 759d638
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
import org.hyperledger.besu.plugin.data.EnodeURL;
import org.hyperledger.besu.plugin.services.BesuConfiguration;
import org.hyperledger.besu.plugin.services.BesuEvents;
import org.hyperledger.besu.plugin.services.PermissioningService;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;
import org.hyperledger.besu.plugin.services.PrivacyPluginService;
import org.hyperledger.besu.plugin.services.RpcEndpointService;
import org.hyperledger.besu.plugin.services.SecurityModuleService;
import org.hyperledger.besu.plugin.services.StorageService;
Expand All @@ -56,6 +58,7 @@
import org.hyperledger.besu.services.BesuPluginContextImpl;
import org.hyperledger.besu.services.PermissioningServiceImpl;
import org.hyperledger.besu.services.PicoCLIOptionsImpl;
import org.hyperledger.besu.services.PrivacyPluginServiceImpl;
import org.hyperledger.besu.services.RpcEndpointServiceImpl;
import org.hyperledger.besu.services.SecurityModuleServiceImpl;
import org.hyperledger.besu.services.StorageServiceImpl;
Expand Down Expand Up @@ -117,15 +120,16 @@ private BesuPluginContextImpl buildPluginContext(
} else {
pluginsPath = Path.of(pluginDir);
}
besuPluginContext.registerPlugins(pluginsPath);

commandLine.parseArgs(node.getConfiguration().getExtraCLIOptions().toArray(new String[0]));

besuPluginContext.addService(BesuConfiguration.class, commonPluginConfiguration);
besuPluginContext.addService(PermissioningService.class, new PermissioningServiceImpl());
besuPluginContext.addService(PrivacyPluginService.class, new PrivacyPluginServiceImpl());

besuPluginContext.registerPlugins(pluginsPath);
commandLine.parseArgs(node.getConfiguration().getExtraCLIOptions().toArray(new String[0]));

// register built-in plugins
new RocksDBPlugin().register(besuPluginContext);

return besuPluginContext;
}

Expand Down

0 comments on commit 759d638

Please sign in to comment.