From 44b01e778d0c832d4447b9fdd5d51cb22fff1d0c Mon Sep 17 00:00:00 2001 From: mikera Date: Fri, 6 Dec 2024 17:10:24 +0000 Subject: [PATCH] Minor GUI / code tweaks --- convex-core/src/main/java/convex/core/cpos/BeliefMerge.java | 4 ++-- convex-core/src/main/java/convex/core/cpos/Order.java | 4 ++-- .../src/test/java/convex/core/cpos/BeliefVotingTest.java | 4 ++-- convex-gui/src/main/java/convex/gui/MainGUI.java | 6 +++--- convex-gui/src/main/java/convex/gui/panels/HomePanel.java | 4 ++-- convex-gui/src/main/java/convex/gui/tools/HackerTools.java | 1 - pom.xml | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/convex-core/src/main/java/convex/core/cpos/BeliefMerge.java b/convex-core/src/main/java/convex/core/cpos/BeliefMerge.java index 458f9df10..d6f8daaa7 100644 --- a/convex-core/src/main/java/convex/core/cpos/BeliefMerge.java +++ b/convex-core/src/main/java/convex/core/cpos/BeliefMerge.java @@ -356,7 +356,7 @@ public AVector> computeWinningOrder(HashMap sta double winningVote = Double.NEGATIVE_INFINITY; for (Map.Entry, HashMap>, Double>> me : blockVotes.entrySet()) { HashMap>, Double> agreedChains = me.getValue(); - double blockVote = computeVote(agreedChains); + double blockVote = computeTotalVote(agreedChains); if ((winningResult==null)||(blockVote > winningVote)) { winningVote = blockVote; winningResult = me; @@ -521,7 +521,7 @@ public Long apply(Order c) { * @param m A map of values to votes * @return The total voting stake */ - public static double computeVote(HashMap m) { + public static double computeTotalVote(HashMap m) { double result = 0.0; for (Map.Entry me : m.entrySet()) { result += me.getValue(); diff --git a/convex-core/src/main/java/convex/core/cpos/Order.java b/convex-core/src/main/java/convex/core/cpos/Order.java index a46504d29..a7852de4e 100644 --- a/convex-core/src/main/java/convex/core/cpos/Order.java +++ b/convex-core/src/main/java/convex/core/cpos/Order.java @@ -221,10 +221,10 @@ public Order withBlocks(AVector> newBlocks) { int n=consensusPoints.length; if ((nblocks!=consensusPoints[0])||(nblocks5.4.1 ${project.version} - 2024-09-17T11:18:52Z + 2024-12-06T13:13:13Z --add-opens=java.base/java.util=ALL-UNNAMED