|
|
@ -373,6 +373,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
|
|
|
|
|
|
|
|
private final TransactionSelectionServiceImpl transactionSelectionServiceImpl; |
|
|
|
private final TransactionSelectionServiceImpl transactionSelectionServiceImpl; |
|
|
|
private final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl; |
|
|
|
private final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl; |
|
|
|
|
|
|
|
private final BlockchainServiceImpl blockchainServiceImpl; |
|
|
|
|
|
|
|
|
|
|
|
static class P2PDiscoveryOptionGroup { |
|
|
|
static class P2PDiscoveryOptionGroup { |
|
|
|
|
|
|
|
|
|
|
@ -957,7 +958,8 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
new PkiBlockCreationConfigurationProvider(), |
|
|
|
new PkiBlockCreationConfigurationProvider(), |
|
|
|
new RpcEndpointServiceImpl(), |
|
|
|
new RpcEndpointServiceImpl(), |
|
|
|
new TransactionSelectionServiceImpl(), |
|
|
|
new TransactionSelectionServiceImpl(), |
|
|
|
new PluginTransactionValidatorServiceImpl()); |
|
|
|
new PluginTransactionValidatorServiceImpl(), |
|
|
|
|
|
|
|
new BlockchainServiceImpl()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -979,6 +981,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
* @param rpcEndpointServiceImpl instance of RpcEndpointServiceImpl |
|
|
|
* @param rpcEndpointServiceImpl instance of RpcEndpointServiceImpl |
|
|
|
* @param transactionSelectionServiceImpl instance of TransactionSelectionServiceImpl |
|
|
|
* @param transactionSelectionServiceImpl instance of TransactionSelectionServiceImpl |
|
|
|
* @param transactionValidatorServiceImpl instance of TransactionValidatorServiceImpl |
|
|
|
* @param transactionValidatorServiceImpl instance of TransactionValidatorServiceImpl |
|
|
|
|
|
|
|
* @param blockchainServiceImpl instance of BlockchainServiceImpl |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@VisibleForTesting |
|
|
|
@VisibleForTesting |
|
|
|
protected BesuCommand( |
|
|
|
protected BesuCommand( |
|
|
@ -997,7 +1000,8 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
final PkiBlockCreationConfigurationProvider pkiBlockCreationConfigProvider, |
|
|
|
final PkiBlockCreationConfigurationProvider pkiBlockCreationConfigProvider, |
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl, |
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl, |
|
|
|
final TransactionSelectionServiceImpl transactionSelectionServiceImpl, |
|
|
|
final TransactionSelectionServiceImpl transactionSelectionServiceImpl, |
|
|
|
final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl) { |
|
|
|
final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl, |
|
|
|
|
|
|
|
final BlockchainServiceImpl blockchainServiceImpl) { |
|
|
|
this.besuComponent = besuComponent; |
|
|
|
this.besuComponent = besuComponent; |
|
|
|
this.logger = besuComponent.getBesuCommandLogger(); |
|
|
|
this.logger = besuComponent.getBesuCommandLogger(); |
|
|
|
this.rlpBlockImporter = rlpBlockImporter; |
|
|
|
this.rlpBlockImporter = rlpBlockImporter; |
|
|
@ -1017,6 +1021,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
this.rpcEndpointServiceImpl = rpcEndpointServiceImpl; |
|
|
|
this.rpcEndpointServiceImpl = rpcEndpointServiceImpl; |
|
|
|
this.transactionSelectionServiceImpl = transactionSelectionServiceImpl; |
|
|
|
this.transactionSelectionServiceImpl = transactionSelectionServiceImpl; |
|
|
|
this.transactionValidatorServiceImpl = transactionValidatorServiceImpl; |
|
|
|
this.transactionValidatorServiceImpl = transactionValidatorServiceImpl; |
|
|
|
|
|
|
|
this.blockchainServiceImpl = blockchainServiceImpl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -1208,6 +1213,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
TransactionSelectionService.class, transactionSelectionServiceImpl); |
|
|
|
TransactionSelectionService.class, transactionSelectionServiceImpl); |
|
|
|
besuPluginContext.addService( |
|
|
|
besuPluginContext.addService( |
|
|
|
PluginTransactionValidatorService.class, transactionValidatorServiceImpl); |
|
|
|
PluginTransactionValidatorService.class, transactionValidatorServiceImpl); |
|
|
|
|
|
|
|
besuPluginContext.addService(BlockchainService.class, blockchainServiceImpl); |
|
|
|
|
|
|
|
|
|
|
|
// register built-in plugins
|
|
|
|
// register built-in plugins
|
|
|
|
rocksDBPlugin = new RocksDBPlugin(); |
|
|
|
rocksDBPlugin = new RocksDBPlugin(); |
|
|
@ -1288,6 +1294,9 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void startPlugins() { |
|
|
|
private void startPlugins() { |
|
|
|
|
|
|
|
blockchainServiceImpl.init( |
|
|
|
|
|
|
|
besuController.getProtocolContext(), besuController.getProtocolSchedule()); |
|
|
|
|
|
|
|
|
|
|
|
besuPluginContext.addService( |
|
|
|
besuPluginContext.addService( |
|
|
|
BesuEvents.class, |
|
|
|
BesuEvents.class, |
|
|
|
new BesuEventsImpl( |
|
|
|
new BesuEventsImpl( |
|
|
@ -1297,10 +1306,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
besuController.getSyncState())); |
|
|
|
besuController.getSyncState())); |
|
|
|
besuPluginContext.addService(MetricsSystem.class, getMetricsSystem()); |
|
|
|
besuPluginContext.addService(MetricsSystem.class, getMetricsSystem()); |
|
|
|
|
|
|
|
|
|
|
|
besuPluginContext.addService( |
|
|
|
|
|
|
|
BlockchainService.class, |
|
|
|
|
|
|
|
new BlockchainServiceImpl(besuController.getProtocolContext().getBlockchain())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
besuPluginContext.addService( |
|
|
|
besuPluginContext.addService( |
|
|
|
TraceService.class, |
|
|
|
TraceService.class, |
|
|
|
new TraceServiceImpl( |
|
|
|
new TraceServiceImpl( |
|
|
|