Skip to content

Commit 4986b78

Browse files
author
Austin Littley
committed
Remove changed unrelated to health monitor
Signed-off-by: Austin Littley <[email protected]>
1 parent 28801bf commit 4986b78

File tree

4 files changed

+4
-45
lines changed

4 files changed

+4
-45
lines changed

hedera-node/hedera-app/src/main/java/com/hedera/node/app/config/ServicesConfigExtension.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
import com.hedera.node.config.data.NettyConfig;
6161
import com.hedera.node.config.data.NetworkAdminConfig;
6262
import com.hedera.node.config.data.NodesConfig;
63-
import com.hedera.node.config.data.PreHandleWorkflowConfig;
6463
import com.hedera.node.config.data.RatesConfig;
6564
import com.hedera.node.config.data.SchedulingConfig;
6665
import com.hedera.node.config.data.SigsConfig;
@@ -129,8 +128,7 @@ public Set<Class<? extends Record>> getConfigDataTypes() {
129128
TraceabilityConfig.class,
130129
UpgradeConfig.class,
131130
UtilPrngConfig.class,
132-
VersionConfig.class,
133-
PreHandleWorkflowConfig.class);
131+
VersionConfig.class);
134132
}
135133

136134
@NonNull

hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/prehandle/PreHandleWorkflowImpl.java

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@
4747
import com.hedera.node.app.workflows.dispatcher.TransactionDispatcher;
4848
import com.hedera.node.config.ConfigProvider;
4949
import com.hedera.node.config.VersionedConfiguration;
50-
import com.hedera.node.config.data.PreHandleWorkflowConfig;
5150
import com.swirlds.platform.system.events.Event;
5251
import com.swirlds.platform.system.transaction.Transaction;
5352
import edu.umd.cs.findbugs.annotations.NonNull;
5453
import edu.umd.cs.findbugs.annotations.Nullable;
5554
import java.util.LinkedHashSet;
5655
import java.util.Map;
5756
import java.util.Set;
58-
import java.util.concurrent.ForkJoinPool;
5957
import java.util.stream.Stream;
6058
import javax.inject.Inject;
6159
import javax.inject.Singleton;
@@ -97,10 +95,6 @@ public class PreHandleWorkflowImpl implements PreHandleWorkflow {
9795
* Used for registering notice of transactionIDs seen by this node
9896
*/
9997
private final DeduplicationCache deduplicationCache;
100-
/**
101-
* Used to pre-handle transactions in parallel.
102-
*/
103-
private final ForkJoinPool preHandlePool;
10498

10599
/**
106100
* Creates a new instance of {@code PreHandleWorkflowImpl}.
@@ -109,6 +103,7 @@ public class PreHandleWorkflowImpl implements PreHandleWorkflow {
109103
* transaction.
110104
* @param transactionChecker the {@link TransactionChecker} for parsing and verifying the transaction
111105
* @param signatureVerifier the {@link SignatureVerifier} to verify signatures
106+
* @throws NullPointerException if any of the parameters is {@code null}
112107
*/
113108
@Inject
114109
public PreHandleWorkflowImpl(
@@ -124,12 +119,6 @@ public PreHandleWorkflowImpl(
124119
this.signatureExpander = requireNonNull(signatureExpander);
125120
this.configProvider = requireNonNull(configProvider);
126121
this.deduplicationCache = requireNonNull(deduplicationCache);
127-
final var config = configProvider.getConfiguration().getConfigData(PreHandleWorkflowConfig.class);
128-
if (config.isCustomPoolEnabled()) {
129-
preHandlePool = new ForkJoinPool(config.preHandleThreadCount());
130-
} else {
131-
preHandlePool = ForkJoinPool.commonPool();
132-
}
133122
}
134123

135124
/**
@@ -149,7 +138,7 @@ public void preHandle(
149138
final var accountStore = readableStoreFactory.getStore(ReadableAccountStore.class);
150139

151140
// In parallel, we will pre-handle each transaction.
152-
transactions.forEach(tx -> preHandlePool.execute(() -> {
141+
transactions.parallel().forEach(tx -> {
153142
if (tx.isSystem()) return;
154143
try {
155144
tx.setMetadata(preHandleTransaction(creator, readableStoreFactory, accountStore, tx));
@@ -161,7 +150,7 @@ public void preHandle(
161150
"Possibly CATASTROPHIC failure while running the pre-handle workflow", unexpectedException);
162151
tx.setMetadata(unknownFailure());
163152
}
164-
}));
153+
});
165154
}
166155

167156
// For each transaction, we will use a background thread to parse the transaction, validate it, lookup the

hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/PreHandleWorkflowConfig.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

hedera-node/hedera-config/src/testFixtures/java/com/hedera/node/config/testfixtures/HederaTestConfigBuilder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import com.hedera.node.config.data.NettyConfig;
6262
import com.hedera.node.config.data.NetworkAdminConfig;
6363
import com.hedera.node.config.data.NodesConfig;
64-
import com.hedera.node.config.data.PreHandleWorkflowConfig;
6564
import com.hedera.node.config.data.RatesConfig;
6665
import com.hedera.node.config.data.SchedulingConfig;
6766
import com.hedera.node.config.data.SigsConfig;
@@ -190,7 +189,6 @@ public static TestConfigBuilder create() {
190189
.withConfigDataType(UtilPrngConfig.class)
191190
.withConfigDataType(VersionConfig.class)
192191
.withConfigDataType(NodesConfig.class)
193-
.withConfigDataType(PreHandleWorkflowConfig.class)
194192
.withConverter(CongestionMultipliers.class, new CongestionMultipliersConverter())
195193
.withConverter(EntityScaleFactors.class, new EntityScaleFactorsConverter())
196194
.withConverter(KnownBlockValues.class, new KnownBlockValuesConverter())

0 commit comments

Comments
 (0)