Skip to content

Commit 748ec99

Browse files
committed
RandomScheduler: remove workaround for Tendermint gossip
1 parent 2c4fd09 commit 748ec99

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

simulator/src/main/java/byzzbench/simulator/scheduler/RandomScheduler.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import byzzbench.simulator.Scenario;
44
import byzzbench.simulator.config.ByzzBenchConfig;
55
import byzzbench.simulator.faults.faults.MessageMutationFault;
6-
import byzzbench.simulator.protocols.tendermint.message.GossipMessage;
76
import byzzbench.simulator.service.MessageMutatorService;
87
import byzzbench.simulator.transport.ClientRequestEvent;
98
import byzzbench.simulator.transport.Event;
@@ -102,10 +101,8 @@ public synchronized Optional<EventDecision> scheduleNext(Scenario scenario) thro
102101
if (dieRoll < 0) {
103102
Event message = getRandomElement(messageEvents);
104103
scenario.getTransport().dropEvent(message.getEventId());
105-
if(!(message instanceof GossipMessage)) {
106-
EventDecision decision = new EventDecision(EventDecision.DecisionType.DROPPED, message.getEventId());
107-
return Optional.of(decision);
108-
}
104+
EventDecision decision = new EventDecision(EventDecision.DecisionType.DROPPED, message.getEventId());
105+
return Optional.of(decision);
109106
}
110107

111108
// check if we should mutate-and-deliver a message sent between nodes
@@ -116,10 +113,7 @@ public synchronized Optional<EventDecision> scheduleNext(Scenario scenario) thro
116113

117114
if (mutators.isEmpty()) {
118115
// no mutators, return nothing
119-
log.warning("No mutators available for message " + message.getEventId());
120-
scenario.getTransport().deliverEvent(message.getEventId());
121-
EventDecision decision = new EventDecision(EventDecision.DecisionType.DELIVERED, message.getEventId());
122-
return Optional.of(decision);
116+
return Optional.empty();
123117
}
124118
scenario.getTransport().applyMutation(
125119
message.getEventId(),

0 commit comments

Comments
 (0)