|
|
@ -148,7 +148,7 @@ public final class RunnerTest { |
|
|
|
.privacyParameters(PrivacyParameters.DEFAULT) |
|
|
|
.privacyParameters(PrivacyParameters.DEFAULT) |
|
|
|
.clock(TestClock.fixed()) |
|
|
|
.clock(TestClock.fixed()) |
|
|
|
.transactionPoolConfiguration(TransactionPoolConfiguration.builder().build()) |
|
|
|
.transactionPoolConfiguration(TransactionPoolConfiguration.builder().build()) |
|
|
|
.storageProvider(createKeyValueStorageProvider(dbAhead)) |
|
|
|
.storageProvider(createKeyValueStorageProvider(dataDirAhead, dbAhead)) |
|
|
|
.build()) { |
|
|
|
.build()) { |
|
|
|
setupState(blockCount, controller.getProtocolSchedule(), controller.getProtocolContext()); |
|
|
|
setupState(blockCount, controller.getProtocolSchedule(), controller.getProtocolContext()); |
|
|
|
} |
|
|
|
} |
|
|
@ -167,7 +167,7 @@ public final class RunnerTest { |
|
|
|
.privacyParameters(PrivacyParameters.DEFAULT) |
|
|
|
.privacyParameters(PrivacyParameters.DEFAULT) |
|
|
|
.clock(TestClock.fixed()) |
|
|
|
.clock(TestClock.fixed()) |
|
|
|
.transactionPoolConfiguration(TransactionPoolConfiguration.builder().build()) |
|
|
|
.transactionPoolConfiguration(TransactionPoolConfiguration.builder().build()) |
|
|
|
.storageProvider(createKeyValueStorageProvider(dbAhead)) |
|
|
|
.storageProvider(createKeyValueStorageProvider(dataDirAhead, dbAhead)) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
final String listenHost = InetAddress.getLoopbackAddress().getHostAddress(); |
|
|
|
final String listenHost = InetAddress.getLoopbackAddress().getHostAddress(); |
|
|
|
final JsonRpcConfiguration aheadJsonRpcConfiguration = jsonRpcConfiguration(); |
|
|
|
final JsonRpcConfiguration aheadJsonRpcConfiguration = jsonRpcConfiguration(); |
|
|
@ -355,7 +355,7 @@ public final class RunnerTest { |
|
|
|
return GenesisConfigFile.fromConfig(jsonNode); |
|
|
|
return GenesisConfigFile.fromConfig(jsonNode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private StorageProvider createKeyValueStorageProvider(final Path dbAhead) { |
|
|
|
private StorageProvider createKeyValueStorageProvider(final Path dataDir, final Path dbDir) { |
|
|
|
return new KeyValueStorageProviderBuilder() |
|
|
|
return new KeyValueStorageProviderBuilder() |
|
|
|
.withStorageFactory( |
|
|
|
.withStorageFactory( |
|
|
|
new RocksDBKeyValueStorageFactory( |
|
|
|
new RocksDBKeyValueStorageFactory( |
|
|
@ -366,7 +366,7 @@ public final class RunnerTest { |
|
|
|
BACKGROUND_THREAD_COUNT, |
|
|
|
BACKGROUND_THREAD_COUNT, |
|
|
|
CACHE_CAPACITY), |
|
|
|
CACHE_CAPACITY), |
|
|
|
Arrays.asList(KeyValueSegmentIdentifier.values()))) |
|
|
|
Arrays.asList(KeyValueSegmentIdentifier.values()))) |
|
|
|
.withCommonConfiguration(new BesuConfigurationImpl(dbAhead)) |
|
|
|
.withCommonConfiguration(new BesuConfigurationImpl(dataDir, dbDir)) |
|
|
|
.withMetricsSystem(new NoOpMetricsSystem()) |
|
|
|
.withMetricsSystem(new NoOpMetricsSystem()) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|