Skip to content

Commit

Permalink
[MINOR] Rename rocksdDbConfiguration to rocksDbConfiguration (PegaSys…
Browse files Browse the repository at this point in the history
  • Loading branch information
smatthewenglish authored and notlesh committed May 4, 2019
1 parent 363573d commit 681e1fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public void startNode(final PantheonNode node) {
.metricsSystem(noOpMetricsSystem)
.maxPendingTransactions(PendingTransactions.MAX_PENDING_TRANSACTIONS)
.pendingTransactionRetentionPeriod(PendingTransactions.DEFAULT_TX_RETENTION_HOURS)
.rocksdDbConfiguration(
new RocksDbConfiguration.Builder().databaseDir(tempDir).build())
.rocksDbConfiguration(new RocksDbConfiguration.Builder().databaseDir(tempDir).build())
.ethereumWireProtocolConfiguration(EthereumWireProtocolConfiguration.defaultConfig())
.clock(Clock.systemUTC())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ PantheonController<?> buildController() {
.fromEthNetworkConfig(updateNetworkConfig(getNetwork()))
.synchronizerConfiguration(buildSyncConfig())
.ethereumWireProtocolConfiguration(ethereumWireConfigurationBuilder.build())
.rocksdDbConfiguration(buildRocksDbConfiguration())
.rocksDbConfiguration(buildRocksDbConfiguration())
.dataDirectory(dataDir())
.miningParameters(
new MiningParameters(coinbase, minTransactionGasPrice, extraData, isMiningEnabled))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public abstract class PantheonControllerBuilder<C> {
protected KeyPair nodeKeys;
private StorageProvider storageProvider;
private final List<Runnable> shutdownActions = new ArrayList<>();
private RocksDbConfiguration rocksdDbConfiguration;
private RocksDbConfiguration rocksDbConfiguration;

public PantheonControllerBuilder<C> rocksdDbConfiguration(
public PantheonControllerBuilder<C> rocksDbConfiguration(
final RocksDbConfiguration rocksDbConfiguration) {
this.rocksdDbConfiguration = rocksDbConfiguration;
this.rocksDbConfiguration = rocksDbConfiguration;
return this;
}

Expand Down Expand Up @@ -171,15 +171,15 @@ public PantheonController<C> build() throws IOException {
checkNotNull(maxPendingTransactions, "Missing max pending transactions");
checkNotNull(nodeKeys, "Missing node keys");
checkArgument(
storageProvider != null || rocksdDbConfiguration != null,
storageProvider != null || rocksDbConfiguration != null,
"Must supply either a storage provider or RocksDB configuration");
checkArgument(
storageProvider == null || rocksdDbConfiguration == null,
storageProvider == null || rocksDbConfiguration == null,
"Must supply either storage provider or RocksDB confguration, but not both");
privacyParameters.setSigningKeyPair(nodeKeys);

if (storageProvider == null && rocksdDbConfiguration != null) {
storageProvider = RocksDbStorageProvider.create(rocksdDbConfiguration, metricsSystem);
if (storageProvider == null && rocksDbConfiguration != null) {
storageProvider = RocksDbStorageProvider.create(rocksDbConfiguration, metricsSystem);
}

prepForBuild();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void initMocks() throws Exception {
when(mockControllerBuilder.synchronizerConfiguration(any())).thenReturn(mockControllerBuilder);
when(mockControllerBuilder.ethereumWireProtocolConfiguration(any()))
.thenReturn(mockControllerBuilder);
when(mockControllerBuilder.rocksdDbConfiguration(any())).thenReturn(mockControllerBuilder);
when(mockControllerBuilder.rocksDbConfiguration(any())).thenReturn(mockControllerBuilder);
when(mockControllerBuilder.dataDirectory(any())).thenReturn(mockControllerBuilder);
when(mockControllerBuilder.miningParameters(any())).thenReturn(mockControllerBuilder);
when(mockControllerBuilder.maxPendingTransactions(anyInt())).thenReturn(mockControllerBuilder);
Expand Down

0 comments on commit 681e1fc

Please sign in to comment.