Skip to content

Commit

Permalink
UpdateDataReq is run periodically
Browse files Browse the repository at this point in the history
  • Loading branch information
freimair committed Mar 6, 2019
1 parent c1fe506 commit 8223148
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions p2p/src/main/java/bisq/network/p2p/P2PService.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ private void onNetworkReady() {
"seedNodeOfPreliminaryDataRequest must be present");

requestDataManager.requestUpdateData();
UserThread.runPeriodically(() -> requestDataManager.requestUpdateData(), 1, TimeUnit.HOURS);

// If we start up first time we don't have any peers so we need to request from seed node.
// As well it can be that the persisted peer list is outdated with dead peers.
Expand All @@ -336,12 +337,11 @@ public void onPreliminaryDataReceived() {

@Override
public void onUpdatedDataReceived() {
if (!isBootstrapped) {
isBootstrapped = true;
maybeProcessAllMailboxEntries();
p2pServiceListeners.stream().forEach(P2PServiceListener::onUpdatedDataReceived);
isBootstrapped = true;
maybeProcessAllMailboxEntries();
p2pServiceListeners.stream().forEach(P2PServiceListener::onUpdatedDataReceived);
if(!isBootstrapped)
p2PDataStorage.onBootstrapComplete();
}
}

@Override
Expand Down

0 comments on commit 8223148

Please sign in to comment.