Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Nov 18, 2023
1 parent a722994 commit 1a71043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
12 changes: 0 additions & 12 deletions ethereal/src/main/java/com/salesforce/apollo/ethereal/Checks.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
*/
public interface Checks {

static final List<BiFunction<Unit, Dag, Correctness>> ConsensusChecks = Arrays.asList(basicCorrectness(),
parentConsistency(),
noSelfForkingEvidence(),
forkerMuting());
static final int MaxDtaBytesPerUnit = (int) 2e6;
static final int MaxRandomSourceDataBytesPerUnit = (int) 1e6;
static final int MaxUnitsInChunk = (int) 1e6;
static final List<BiFunction<Unit, Dag, Correctness>> SetupChecks = Arrays.asList(basicCorrectness(),
parentConsistency(),
noLevelSkipping(),
noForks());

static BiFunction<Unit, Dag, Correctness> basicCorrectness() {
return (u, dag) -> {
var parents = u.parents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
import java.security.SecureRandom;
import java.time.Duration;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;

Expand Down Expand Up @@ -113,7 +115,6 @@ private void one(int iteration)
produced.add(new CopyOnWriteArrayList<>());
}

List<ExecutorService> executors = new ArrayList<>();
final var prefix = UUID.randomUUID().toString();
int maxSize = 1024 * 1024;
for (short i = 0; i < (short) NPROC; i++) {
Expand Down Expand Up @@ -160,13 +161,6 @@ private void one(int iteration)
controllers.forEach(e -> e.stop());
gossipers.forEach(e -> e.stop());
comms.forEach(e -> e.close(Duration.ofSeconds(1)));
executors.forEach(executor -> {
executor.shutdown();
try {
executor.awaitTermination(1, TimeUnit.SECONDS);
} catch (InterruptedException e1) {
}
});
}

final var expected = NUM_EPOCHS * (EPOCH_LENGTH - 1);
Expand Down

0 comments on commit 1a71043

Please sign in to comment.