|
|
|
@ -106,7 +106,8 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
final TransactionPoolValidatorServiceImpl transactionPoolValidatorServiceImpl, |
|
|
|
|
final BlockchainServiceImpl blockchainServiceImpl, |
|
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl, |
|
|
|
|
final BesuConfiguration commonPluginConfiguration) { |
|
|
|
|
final BesuConfiguration commonPluginConfiguration, |
|
|
|
|
final PermissioningServiceImpl permissioningService) { |
|
|
|
|
final CommandLine commandLine = new CommandLine(CommandSpec.create()); |
|
|
|
|
final BesuPluginContextImpl besuPluginContext = new BesuPluginContextImpl(); |
|
|
|
|
besuPluginContext.addService(StorageService.class, storageService); |
|
|
|
@ -137,7 +138,7 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
besuPluginContext.addService(BesuConfiguration.class, commonPluginConfiguration); |
|
|
|
|
besuPluginContext.addService(PermissioningService.class, new PermissioningServiceImpl()); |
|
|
|
|
besuPluginContext.addService(PermissioningService.class, permissioningService); |
|
|
|
|
besuPluginContext.addService(PrivacyPluginService.class, new PrivacyPluginServiceImpl()); |
|
|
|
|
|
|
|
|
|
besuPluginContext.registerPlugins(pluginsPath); |
|
|
|
@ -172,6 +173,8 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl = new RpcEndpointServiceImpl(); |
|
|
|
|
final Path dataDir = node.homeDirectory(); |
|
|
|
|
final BesuConfigurationImpl commonPluginConfiguration = new BesuConfigurationImpl(); |
|
|
|
|
final PermissioningServiceImpl permissioningService = new PermissioningServiceImpl(); |
|
|
|
|
|
|
|
|
|
final var miningParameters = |
|
|
|
|
ImmutableMiningParameters.builder() |
|
|
|
|
.from(node.getMiningParameters()) |
|
|
|
@ -195,7 +198,8 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
transactionPoolValidatorServiceImpl, |
|
|
|
|
blockchainServiceImpl, |
|
|
|
|
rpcEndpointServiceImpl, |
|
|
|
|
commonPluginConfiguration)); |
|
|
|
|
commonPluginConfiguration, |
|
|
|
|
permissioningService)); |
|
|
|
|
|
|
|
|
|
GlobalOpenTelemetry.resetForTest(); |
|
|
|
|
final ObservableMetricsSystem metricsSystem = |
|
|
|
@ -283,7 +287,7 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
.jsonRpcIpcConfiguration(node.jsonRpcIpcConfiguration()) |
|
|
|
|
.dataDir(node.homeDirectory()) |
|
|
|
|
.metricsSystem(metricsSystem) |
|
|
|
|
.permissioningService(new PermissioningServiceImpl()) |
|
|
|
|
.permissioningService(permissioningService) |
|
|
|
|
.metricsConfiguration(node.getMetricsConfiguration()) |
|
|
|
|
.p2pEnabled(node.isP2pEnabled()) |
|
|
|
|
.p2pTLSConfiguration(node.getTLSConfiguration()) |
|
|
|
@ -292,15 +296,14 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { |
|
|
|
|
node.getStaticNodes().stream() |
|
|
|
|
.map(EnodeURLImpl::fromString) |
|
|
|
|
.collect(Collectors.toList())) |
|
|
|
|
.besuPluginContext(new BesuPluginContextImpl()) |
|
|
|
|
.besuPluginContext(besuPluginContext) |
|
|
|
|
.autoLogBloomCaching(false) |
|
|
|
|
.storageProvider(storageProvider) |
|
|
|
|
.rpcEndpointService(rpcEndpointServiceImpl); |
|
|
|
|
node.engineRpcConfiguration().ifPresent(runnerBuilder::engineJsonRpcConfiguration); |
|
|
|
|
|
|
|
|
|
final Runner runner = runnerBuilder.build(); |
|
|
|
|
|
|
|
|
|
besuPluginContext.beforeExternalServices(); |
|
|
|
|
final Runner runner = runnerBuilder.build(); |
|
|
|
|
|
|
|
|
|
runner.startExternalServices(); |
|
|
|
|
|
|
|
|
|