Skip to content

Commit

Permalink
RandomScheduler: remove workaround for Tendermint gossip
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomlneto committed Mar 3, 2025
1 parent 2c4fd09 commit 748ec99
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import byzzbench.simulator.Scenario;
import byzzbench.simulator.config.ByzzBenchConfig;
import byzzbench.simulator.faults.faults.MessageMutationFault;
import byzzbench.simulator.protocols.tendermint.message.GossipMessage;
import byzzbench.simulator.service.MessageMutatorService;
import byzzbench.simulator.transport.ClientRequestEvent;
import byzzbench.simulator.transport.Event;
Expand Down Expand Up @@ -102,10 +101,8 @@ public synchronized Optional<EventDecision> scheduleNext(Scenario scenario) thro
if (dieRoll < 0) {
Event message = getRandomElement(messageEvents);
scenario.getTransport().dropEvent(message.getEventId());
if(!(message instanceof GossipMessage)) {
EventDecision decision = new EventDecision(EventDecision.DecisionType.DROPPED, message.getEventId());
return Optional.of(decision);
}
EventDecision decision = new EventDecision(EventDecision.DecisionType.DROPPED, message.getEventId());
return Optional.of(decision);
}

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

if (mutators.isEmpty()) {
// no mutators, return nothing
log.warning("No mutators available for message " + message.getEventId());
scenario.getTransport().deliverEvent(message.getEventId());
EventDecision decision = new EventDecision(EventDecision.DecisionType.DELIVERED, message.getEventId());
return Optional.of(decision);
return Optional.empty();
}
scenario.getTransport().applyMutation(
message.getEventId(),
Expand Down

0 comments on commit 748ec99

Please sign in to comment.