Skip to content

Commit 8c582cd

Browse files
committed
Important round mutation change
1 parent 59d65ae commit 8c582cd

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

simulator/src/main/java/byzzbench/simulator/protocols/hbft/MessageLog.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ private void gcNewView(long newViewNumber) {
551551
* 4.4. This means that any view change votes and pending tickets that
552552
* are not in the new view are removed.
553553
*/
554-
this.viewChanges.remove(newViewNumber);
554+
this.viewChanges.clear();
555555

556556
Iterator<TicketKey> iterator = this.tickets.keySet().iterator();
557557
while (iterator.hasNext()) {
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
package byzzbench.simulator.protocols.hbft.message;
22

33
import byzzbench.simulator.transport.MessagePayload;
4+
import byzzbench.simulator.transport.messages.MessageWithRound;
45

5-
public abstract class IPhaseMessage extends MessagePayload {
6+
public abstract class IPhaseMessage extends MessagePayload implements MessageWithRound {
67
public abstract long getViewNumber();
78

89
public abstract long getSequenceNumber();
910

1011
public abstract byte[] getDigest();
12+
13+
/**
14+
* Get the request of the message.
15+
*
16+
* @return The request of the message.
17+
*/
18+
public long getRound() {
19+
return getSequenceNumber();
20+
}
1121

1222
}

0 commit comments

Comments
 (0)