mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Move code from constructor to onAllServicesInitialized
This commit is contained in:
parent
55e4685244
commit
0572f2e009
1 changed files with 15 additions and 15 deletions
|
@ -91,7 +91,7 @@ public class ArbitratorManager {
|
|||
private final User user;
|
||||
private final Preferences preferences;
|
||||
private final ObservableMap<NodeAddress, Arbitrator> arbitratorsObservableMap = FXCollections.observableHashMap();
|
||||
private final List<Arbitrator> persistedAcceptedArbitrators;
|
||||
private List<Arbitrator> persistedAcceptedArbitrators;
|
||||
private Timer republishArbitratorTimer, retryRepublishArbitratorTimer;
|
||||
|
||||
|
||||
|
@ -105,13 +105,19 @@ public class ArbitratorManager {
|
|||
this.arbitratorService = arbitratorService;
|
||||
this.user = user;
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
persistedAcceptedArbitrators = new ArrayList<>(user.getAcceptedArbitrators());
|
||||
user.clearAcceptedArbitrators();
|
||||
public void shutDown() {
|
||||
stopRepublishArbitratorTimer();
|
||||
stopRetryRepublishArbitratorTimer();
|
||||
}
|
||||
|
||||
// TODO we mirror arbitrator data for mediator as long we have not impl. it in the UI
|
||||
user.clearAcceptedMediators();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// API
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void onAllServicesInitialized() {
|
||||
arbitratorService.addHashSetChangedListener(new HashMapChangedListener() {
|
||||
@Override
|
||||
public void onAdded(ProtectedStorageEntry data) {
|
||||
|
@ -129,19 +135,13 @@ public class ArbitratorManager {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void shutDown() {
|
||||
stopRepublishArbitratorTimer();
|
||||
stopRetryRepublishArbitratorTimer();
|
||||
}
|
||||
persistedAcceptedArbitrators = new ArrayList<>(user.getAcceptedArbitrators());
|
||||
user.clearAcceptedArbitrators();
|
||||
|
||||
// TODO we mirror arbitrator data for mediator as long we have not impl. it in the UI
|
||||
user.clearAcceptedMediators();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// API
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void onAllServicesInitialized() {
|
||||
if (user.getRegisteredArbitrator() != null) {
|
||||
P2PService p2PService = arbitratorService.getP2PService();
|
||||
if (p2PService.isBootstrapped())
|
||||
|
|
Loading…
Add table
Reference in a new issue