This occasionally leads to the exception below:
Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:870)
at java.base/java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:487)
at java.base/java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:426)
at java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:222)
at java.base/java.util.Arrays.sort(Arrays.java:1315)
at java.base/java.util.Arrays.sort(Arrays.java:1509)
at java.base/java.util.ArrayList.sort(ArrayList.java:1749)
at java.base/java.util.Collections.sort(Collections.java:145)
at peersim.kademlia.Discv5TopicTable.makeRegisterDecisionForTopic(Discv5TopicTable.java:184)
at peersim.kademlia.Discv5TicketProtocol.makeRegisterDecision(Discv5TicketProtocol.java:177)
at peersim.kademlia.Discv5TicketProtocol.processEvent(Discv5TicketProtocol.java:800)
at peersim.edsim.EDSimulator.executeNext(EDSimulator.java:316)
at peersim.edsim.EDSimulator.nextExperiment(EDSimulator.java:362)
at peersim.Simulator.main(Simulator.java:194)
This occasionally leads to the exception below: Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.base/java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:870) at java.base/java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:487) at java.base/java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:426) at java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:222) at java.base/java.util.Arrays.sort(Arrays.java:1315) at java.base/java.util.Arrays.sort(Arrays.java:1509) at java.base/java.util.ArrayList.sort(ArrayList.java:1749) at java.base/java.util.Collections.sort(Collections.java:145) at peersim.kademlia.Discv5TopicTable.makeRegisterDecisionForTopic(Discv5TopicTable.java:184) at peersim.kademlia.Discv5TicketProtocol.makeRegisterDecision(Discv5TicketProtocol.java:177) at peersim.kademlia.Discv5TicketProtocol.processEvent(Discv5TicketProtocol.java:800) at peersim.edsim.EDSimulator.executeNext(EDSimulator.java:316) at peersim.edsim.EDSimulator.nextExperiment(EDSimulator.java:362) at peersim.Simulator.main(Simulator.java:194)