Skip to content

Commit

Permalink
Remove changed unrelated to health monitor
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Littley <[email protected]>
  • Loading branch information
Austin Littley committed Jul 16, 2024
1 parent 28801bf commit 4986b78
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import com.hedera.node.config.data.NettyConfig;
import com.hedera.node.config.data.NetworkAdminConfig;
import com.hedera.node.config.data.NodesConfig;
import com.hedera.node.config.data.PreHandleWorkflowConfig;
import com.hedera.node.config.data.RatesConfig;
import com.hedera.node.config.data.SchedulingConfig;
import com.hedera.node.config.data.SigsConfig;
Expand Down Expand Up @@ -129,8 +128,7 @@ public Set<Class<? extends Record>> getConfigDataTypes() {
TraceabilityConfig.class,
UpgradeConfig.class,
UtilPrngConfig.class,
VersionConfig.class,
PreHandleWorkflowConfig.class);
VersionConfig.class);
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@
import com.hedera.node.app.workflows.dispatcher.TransactionDispatcher;
import com.hedera.node.config.ConfigProvider;
import com.hedera.node.config.VersionedConfiguration;
import com.hedera.node.config.data.PreHandleWorkflowConfig;
import com.swirlds.platform.system.events.Event;
import com.swirlds.platform.system.transaction.Transaction;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ForkJoinPool;
import java.util.stream.Stream;
import javax.inject.Inject;
import javax.inject.Singleton;
Expand Down Expand Up @@ -97,10 +95,6 @@ public class PreHandleWorkflowImpl implements PreHandleWorkflow {
* Used for registering notice of transactionIDs seen by this node
*/
private final DeduplicationCache deduplicationCache;
/**
* Used to pre-handle transactions in parallel.
*/
private final ForkJoinPool preHandlePool;

/**
* Creates a new instance of {@code PreHandleWorkflowImpl}.
Expand All @@ -109,6 +103,7 @@ public class PreHandleWorkflowImpl implements PreHandleWorkflow {
* transaction.
* @param transactionChecker the {@link TransactionChecker} for parsing and verifying the transaction
* @param signatureVerifier the {@link SignatureVerifier} to verify signatures
* @throws NullPointerException if any of the parameters is {@code null}
*/
@Inject
public PreHandleWorkflowImpl(
Expand All @@ -124,12 +119,6 @@ public PreHandleWorkflowImpl(
this.signatureExpander = requireNonNull(signatureExpander);
this.configProvider = requireNonNull(configProvider);
this.deduplicationCache = requireNonNull(deduplicationCache);
final var config = configProvider.getConfiguration().getConfigData(PreHandleWorkflowConfig.class);
if (config.isCustomPoolEnabled()) {
preHandlePool = new ForkJoinPool(config.preHandleThreadCount());
} else {
preHandlePool = ForkJoinPool.commonPool();
}
}

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

// In parallel, we will pre-handle each transaction.
transactions.forEach(tx -> preHandlePool.execute(() -> {
transactions.parallel().forEach(tx -> {
if (tx.isSystem()) return;
try {
tx.setMetadata(preHandleTransaction(creator, readableStoreFactory, accountStore, tx));
Expand All @@ -161,7 +150,7 @@ public void preHandle(
"Possibly CATASTROPHIC failure while running the pre-handle workflow", unexpectedException);
tx.setMetadata(unknownFailure());
}
}));
});
}

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import com.hedera.node.config.data.NettyConfig;
import com.hedera.node.config.data.NetworkAdminConfig;
import com.hedera.node.config.data.NodesConfig;
import com.hedera.node.config.data.PreHandleWorkflowConfig;
import com.hedera.node.config.data.RatesConfig;
import com.hedera.node.config.data.SchedulingConfig;
import com.hedera.node.config.data.SigsConfig;
Expand Down Expand Up @@ -190,7 +189,6 @@ public static TestConfigBuilder create() {
.withConfigDataType(UtilPrngConfig.class)
.withConfigDataType(VersionConfig.class)
.withConfigDataType(NodesConfig.class)
.withConfigDataType(PreHandleWorkflowConfig.class)
.withConverter(CongestionMultipliers.class, new CongestionMultipliersConverter())
.withConverter(EntityScaleFactors.class, new EntityScaleFactorsConverter())
.withConverter(KnownBlockValues.class, new KnownBlockValuesConverter())
Expand Down

0 comments on commit 4986b78

Please sign in to comment.