diff --git a/common/src/main/java/bisq/common/util/PermutationUtil.java b/common/src/main/java/bisq/common/util/PermutationUtil.java index c42df229fe4..dbcab390a16 100644 --- a/common/src/main/java/bisq/common/util/PermutationUtil.java +++ b/common/src/main/java/bisq/common/util/PermutationUtil.java @@ -60,7 +60,7 @@ public static List getPartialList(List list, List indicesToRe * With 20 items we reach about 1 million iterations and it takes about 0.5 sec. * To avoid performance issues we added the maxIterations parameter to stop once the number of iterations has * reached the maxIterations and return in such a case the list of permutations we have been able to create. - * Depending on the type of object which is stored in the list the memory usage should to be considered as well for + * Depending on the type of object which is stored in the list the memory usage should be considered as well for * choosing the right maxIterations value. * * @param list List from which we create permutations diff --git a/common/src/test/java/bisq/common/util/PermutationTest.java b/common/src/test/java/bisq/common/util/PermutationTest.java index d8bd14b238f..149cf9c971a 100644 --- a/common/src/test/java/bisq/common/util/PermutationTest.java +++ b/common/src/test/java/bisq/common/util/PermutationTest.java @@ -51,45 +51,45 @@ public void testGetPartialList() { assertTrue(expected.toString().equals(result.toString())); // remove first - indicesToRemove = indicesToRemove = Collections.singletonList(0); + indicesToRemove = Collections.singletonList(0); expected = new ArrayList<>(list); expected.remove(0); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // remove last - indicesToRemove = indicesToRemove = Collections.singletonList(5); + indicesToRemove = Collections.singletonList(5); expected = new ArrayList<>(list); expected.remove(5); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // remove all - indicesToRemove = indicesToRemove = Arrays.asList(0, 1, 2, 3, 4, 5); + indicesToRemove = Arrays.asList(0, 1, 2, 3, 4, 5); expected = new ArrayList<>(); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // wrong sorting of indices - indicesToRemove = indicesToRemove = Arrays.asList(4, 0, 1); + indicesToRemove = Arrays.asList(4, 0, 1); expected = expected = new ArrayList<>(Arrays.asList(blindVote2, blindVote3, blindVote5)); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // wrong sorting of indices - indicesToRemove = indicesToRemove = Arrays.asList(0, 0); - expected = expected = new ArrayList<>(Arrays.asList(blindVote1, blindVote2, blindVote3, blindVote4, blindVote5)); + indicesToRemove = Arrays.asList(0, 0); + expected = new ArrayList<>(Arrays.asList(blindVote1, blindVote2, blindVote3, blindVote4, blindVote5)); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // don't remove as invalid index - indicesToRemove = indicesToRemove = Collections.singletonList(9); + indicesToRemove = Collections.singletonList(9); expected = new ArrayList<>(list); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); // don't remove as invalid index - indicesToRemove = indicesToRemove = Collections.singletonList(-2); + indicesToRemove = Collections.singletonList(-2); expected = new ArrayList<>(list); result = PermutationUtil.getPartialList(list, indicesToRemove); assertTrue(expected.toString().equals(result.toString())); diff --git a/core/src/main/java/bisq/core/dao/governance/voteresult/MissingDataRequestService.java b/core/src/main/java/bisq/core/dao/governance/voteresult/MissingDataRequestService.java index cb922a2bff2..24d38f03d2a 100644 --- a/core/src/main/java/bisq/core/dao/governance/voteresult/MissingDataRequestService.java +++ b/core/src/main/java/bisq/core/dao/governance/voteresult/MissingDataRequestService.java @@ -78,6 +78,9 @@ public void sendRepublishRequest() { } public void reRepublishAllGovernanceData() { + log.warn("We received a RepublishGovernanceDataRequest and re-published all proposalPayloads and " + + "blindVotePayloads to the P2P network."); + ObservableList proposalPayloads = proposalService.getProposalPayloads(); proposalPayloads.forEach(proposalPayload -> { // We want a random delay between 0.1 and 30 sec. depending on the number of items @@ -86,7 +89,7 @@ public void reRepublishAllGovernanceData() { boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true); String txId = proposalPayload.getProposal().getTxId(); if (success) { - log.warn("We received a RepublishGovernanceDataRequest and re-published a proposalPayload to " + + log.debug("We received a RepublishGovernanceDataRequest and re-published a proposalPayload to " + "the P2P network as append only data. proposalTxId={}", txId); } else { log.error("Adding of proposalPayload to P2P network failed. proposalTxId={}", txId); @@ -103,7 +106,7 @@ public void reRepublishAllGovernanceData() { boolean success = p2PService.addPersistableNetworkPayload(blindVotePayload, true); String txId = blindVotePayload.getBlindVote().getTxId(); if (success) { - log.warn("We received a RepublishGovernanceDataRequest and re-published a blindVotePayload to " + + log.debug("We received a RepublishGovernanceDataRequest and re-published a blindVotePayload to " + "the P2P network as append only data. blindVoteTxId={}", txId); } else { log.error("Adding of blindVotePayload to P2P network failed. blindVoteTxId={}", txId);