-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dao permute blindvotelist if not majority hash #2361
Dao permute blindvotelist if not majority hash #2361
Conversation
I don't know why travis was complaining as in that PR the throws is not needed. I added it as in another PR the exception handling is changed and then its needed anyway. Hope Travis gets with the update its cache cleaned.... |
…hash # Conflicts: # core/src/main/java/bisq/core/dao/governance/votereveal/VoteRevealService.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
I think it would be better to do the permutations starting with the more likely outcomes but the PR seems otherwise correct after applying my other suggestions.
* @param <T> Type of list items | ||
* @return List of possible permutations of the original list | ||
*/ | ||
public static <T> List<List<T>> findAllPermutations(List<T> list, int maxIterations) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function will build permutations starting from shorter lists. If it reaches the max number of permutations it will skip the more likely cases with regard to voting. It's more likely that one or a few votes are missing rather than most of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes agree. Not trivial though to optimize it in that direction...
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
Co-Authored-By: ManfredKarrer <[email protected]>
…-majority-hash' into dao-permute-blindvotelist-if-not-majority-hash
No description provided.