Skip to content

Commit 47d2dfc

Browse files
committedFeb 27, 2025·
fix build
1 parent 600fa4d commit 47d2dfc

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed
 

‎simulator/src/main/java/byzzbench/simulator/Client.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public Instant getCurrentTime() {
9595
* @return the timer object
9696
*/
9797
public long setTimeout(String name, Runnable r, Duration timeout) {
98-
return this.scenario.getTransport().setTimeout(this, r, timeout);
98+
return this.scenario.getTransport().setTimeout(this, r, timeout, "REQUEST");
9999
}
100100

101101
/**

‎simulator/src/main/java/byzzbench/simulator/HbftClient.java

+1-16
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,7 @@ public void handleMessage(String senderId, MessagePayload payload) {
148148
*/
149149
public long setTimeout(String name, Runnable r, long timeout) {
150150
Duration duration = Duration.ofSeconds(timeout);
151-
return super.scenario.getTransport().setTimeout(this, r, duration);
152-
}
153-
154-
/**
155-
* Set a timeout for this client.
156-
*
157-
* @param r the runnable to execute when the timeout occurs
158-
* @param timeout the timeout in milliseconds
159-
* @return the timeout ID
160-
*/
161-
public long setTimeout(Runnable r, long timeout) {
162-
Runnable wrapper = () -> {
163-
r.run();
164-
};
165-
Duration duration = Duration.ofSeconds(timeout);
166-
return super.scenario.getTransport().setTimeout(this, wrapper, duration);
151+
return super.scenario.getTransport().setTimeout(this, r, duration, name);
167152
}
168153

169154
/**

‎simulator/src/main/java/byzzbench/simulator/scheduler/twins/TwinsTransport.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ public synchronized void sendClientResponse(Node sender, MessagePayload response
171171
}
172172

173173
@Override
174-
public synchronized long setTimeout(Node node, Runnable runnable, Duration timeout) {
175-
Long eventId = this.getScenario().getTransport().setTimeout(node, runnable, timeout);
174+
public synchronized long setTimeout(Node node, Runnable runnable, Duration timeout, String description) {
175+
long eventId = this.getScenario().getTransport().setTimeout(node, runnable, timeout, description);
176176

177177
this.queuedTimeouts
178178
.computeIfAbsent(node.getId(), k -> new ArrayList<>())

0 commit comments

Comments
 (0)
Please sign in to comment.