mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Refactor: Move code for adding decryptedBallotsWithMeritsSet to daoStateService
This commit is contained in:
parent
5702ab03cc
commit
076e3faf95
2 changed files with 8 additions and 3 deletions
|
@ -176,9 +176,7 @@ public class VoteResultService implements DaoStateListener, DaoSetupService {
|
|||
long startTs = System.currentTimeMillis();
|
||||
|
||||
Set<DecryptedBallotsWithMerits> decryptedBallotsWithMeritsSet = getDecryptedBallotsWithMeritsSet(chainHeight);
|
||||
decryptedBallotsWithMeritsSet.stream()
|
||||
.filter(e -> !daoStateService.getDecryptedBallotsWithMeritsList().contains(e))
|
||||
.forEach(daoStateService.getDecryptedBallotsWithMeritsList()::add);
|
||||
daoStateService.addAllDecryptedBallotsWithMeritsList(decryptedBallotsWithMeritsSet);
|
||||
|
||||
if (!decryptedBallotsWithMeritsSet.isEmpty()) {
|
||||
// From the decryptedBallotsWithMerits we create a map with the hash of the blind vote list as key and the
|
||||
|
|
|
@ -912,6 +912,13 @@ public class DaoStateService implements DaoSetupService {
|
|||
return daoState.getDecryptedBallotsWithMeritsList();
|
||||
}
|
||||
|
||||
public void addAllDecryptedBallotsWithMeritsList(Set<DecryptedBallotsWithMerits> decryptedBallotsWithMeritsSet) {
|
||||
decryptedBallotsWithMeritsSet.stream()
|
||||
.filter(e -> !daoState.getDecryptedBallotsWithMeritsList().contains(e))
|
||||
.forEach(daoState.getDecryptedBallotsWithMeritsList()::add);
|
||||
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Asset listing fee
|
||||
|
|
Loading…
Add table
Reference in a new issue