Skip to content

Commit

Permalink
Fix tests and util
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh committed Apr 10, 2024
1 parent 6099b66 commit a3eb42d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import tech.pegasys.teku.statetransition.forkchoice.NoopForkChoiceNotifier;
import tech.pegasys.teku.statetransition.forkchoice.ProposersDataManager;
import tech.pegasys.teku.statetransition.synccommittee.SyncCommitteeContributionPool;
import tech.pegasys.teku.statetransition.util.P2PDumpManager;
import tech.pegasys.teku.statetransition.validation.SignedBlsToExecutionChangeValidator;
import tech.pegasys.teku.statetransition.validatorcache.ActiveValidatorCache;
import tech.pegasys.teku.statetransition.validatorcache.ActiveValidatorChannel;
Expand Down Expand Up @@ -201,6 +202,7 @@ private void setupStorage(
new NoopForkChoiceNotifier(),
new MergeTransitionBlockValidator(
spec, recentChainData, ExecutionLayerChannel.NOOP),
mock(P2PDumpManager.class),
storageSystem.getMetricsSystem());
final Function<UInt64, BeaconBlockBodySchema<?>> beaconBlockSchemaSupplier =
slot -> spec.atSlot(slot).getSchemaDefinitions().getBeaconBlockBodySchema();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import tech.pegasys.teku.statetransition.forkchoice.MergeTransitionBlockValidator;
import tech.pegasys.teku.statetransition.forkchoice.NoopForkChoiceNotifier;
import tech.pegasys.teku.statetransition.util.FutureItems;
import tech.pegasys.teku.statetransition.util.P2PDumpManager;
import tech.pegasys.teku.statetransition.util.PendingPool;
import tech.pegasys.teku.statetransition.util.PoolFactory;
import tech.pegasys.teku.statetransition.validation.AggregateAttestationValidator;
Expand Down Expand Up @@ -86,6 +87,7 @@ class AttestationManagerIntegrationTest {
BlobSidecarManager.NOOP,
new NoopForkChoiceNotifier(),
transitionBlockValidator,
mock(P2PDumpManager.class),
storageSystem.getMetricsSystem());

private final PendingPool<ValidatableAttestation> pendingAttestations =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static org.mockito.Mockito.mock;
import static tech.pegasys.teku.infrastructure.async.SafeFutureAssert.safeJoin;
import static tech.pegasys.teku.infrastructure.async.SyncAsyncRunner.SYNC_RUNNER;
import static tech.pegasys.teku.infrastructure.time.TimeUtilities.secondsToMillis;
Expand Down Expand Up @@ -50,6 +51,7 @@
import tech.pegasys.teku.statetransition.forkchoice.ForkChoice;
import tech.pegasys.teku.statetransition.forkchoice.MergeTransitionBlockValidator;
import tech.pegasys.teku.statetransition.forkchoice.NoopForkChoiceNotifier;
import tech.pegasys.teku.statetransition.util.P2PDumpManager;
import tech.pegasys.teku.statetransition.validation.BlockBroadcastValidator;
import tech.pegasys.teku.storage.client.ChainHead;
import tech.pegasys.teku.storage.client.RecentChainData;
Expand Down Expand Up @@ -109,7 +111,7 @@ public static BeaconChainUtil create(
BlobSidecarManager.NOOP,
new NoopForkChoiceNotifier(),
new MergeTransitionBlockValidator(spec, storageClient, ExecutionLayerChannel.NOOP),
null,
mock(P2PDumpManager.class),
new StubMetricsSystem()),
true);
}
Expand All @@ -130,7 +132,7 @@ public static BeaconChainUtil create(
BlobSidecarManager.NOOP,
new NoopForkChoiceNotifier(),
new MergeTransitionBlockValidator(spec, storageClient, ExecutionLayerChannel.NOOP),
null,
mock(P2PDumpManager.class),
new StubMetricsSystem()),
signDeposits);
}
Expand Down Expand Up @@ -328,7 +330,7 @@ public BeaconChainUtil build() {
new NoopForkChoiceNotifier(),
new MergeTransitionBlockValidator(
spec, recentChainData, ExecutionLayerChannel.NOOP),
null,
mock(P2PDumpManager.class),
new StubMetricsSystem());
}
if (validatorKeys == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
Expand Down Expand Up @@ -56,6 +57,7 @@
import tech.pegasys.teku.statetransition.forkchoice.ForkChoice;
import tech.pegasys.teku.statetransition.forkchoice.MergeTransitionBlockValidator;
import tech.pegasys.teku.statetransition.forkchoice.NoopForkChoiceNotifier;
import tech.pegasys.teku.statetransition.util.P2PDumpManager;
import tech.pegasys.teku.statetransition.validation.BlockBroadcastValidator;
import tech.pegasys.teku.storage.client.MemoryOnlyRecentChainData;
import tech.pegasys.teku.storage.client.RecentChainData;
Expand Down Expand Up @@ -189,6 +191,7 @@ void runForkChoiceTests(
BlobSidecarManager.NOOP,
new NoopForkChoiceNotifier(),
transitionBlockValidator,
mock(P2PDumpManager.class),
new StubMetricsSystem());

@SuppressWarnings("ModifiedButNotUsed")
Expand Down

0 comments on commit a3eb42d

Please sign in to comment.