use of com.radixdlt.ledger.IncorrectAlwaysAcceptingAccumulatorVerifierModule in project radixdlt by radixdlt.
the class ByzantineSyncTest method given_a_sometimes_byzantine_sync_layer_with_incorrect_accumulator_verifier__sanity_tests_should_not_pass.
@Test
public void given_a_sometimes_byzantine_sync_layer_with_incorrect_accumulator_verifier__sanity_tests_should_not_pass() {
SimulationTest simulationTest = bftTestBuilder.addOverrideModuleToAllInitialNodes(new IncorrectAlwaysAcceptingAccumulatorVerifierModule()).build();
final var runningTest = simulationTest.run();
final var checkResults = runningTest.awaitCompletion();
LongSummaryStatistics statistics = runningTest.getNetwork().getSystemCounters().values().stream().map(s -> s.get(CounterType.SYNC_VALID_RESPONSES_RECEIVED)).mapToLong(l -> l).summaryStatistics();
logger.info("{}", statistics);
assertThat(checkResults).hasEntrySatisfying(Monitor.LEDGER_IN_ORDER, error -> assertThat(error).isPresent());
}
Aggregations