mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 06:55:08 +01:00
Merge pull request #6231 from chimp1984/reset_tor_files_at_seed_node_startup
Clean up tor files at seed node startup
This commit is contained in:
commit
6baf89eb04
1 changed files with 10 additions and 4 deletions
|
@ -21,7 +21,6 @@ import bisq.core.app.TorSetup;
|
|||
import bisq.core.app.misc.ExecutableForAppWithP2p;
|
||||
import bisq.core.app.misc.ModuleForAppWithP2p;
|
||||
import bisq.core.dao.state.DaoStateSnapshotService;
|
||||
import bisq.core.user.Cookie;
|
||||
import bisq.core.user.CookieKey;
|
||||
import bisq.core.user.User;
|
||||
|
||||
|
@ -139,7 +138,7 @@ public class SeedNodeMain extends ExecutableForAppWithP2p {
|
|||
protected void startApplication() {
|
||||
super.startApplication();
|
||||
|
||||
Cookie cookie = injector.getInstance(User.class).getCookie();
|
||||
/* Cookie cookie = injector.getInstance(User.class).getCookie();
|
||||
cookie.getAsOptionalBoolean(CookieKey.CLEAN_TOR_DIR_AT_RESTART).ifPresent(wasCleanTorDirSet -> {
|
||||
if (wasCleanTorDirSet) {
|
||||
injector.getInstance(TorSetup.class).cleanupTorFiles(() -> {
|
||||
|
@ -147,9 +146,16 @@ public class SeedNodeMain extends ExecutableForAppWithP2p {
|
|||
cookie.remove(CookieKey.CLEAN_TOR_DIR_AT_RESTART);
|
||||
}, log::error);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
// Reset tor files at startup
|
||||
// We observe slow tor start at seed nodes. Not sure what caused that but cleaning the tor files might help.
|
||||
injector.getInstance(TorSetup.class).cleanupTorFiles(() -> {
|
||||
log.info("Tor directory reset");
|
||||
|
||||
seedNode.startApplication();
|
||||
}, log::error);
|
||||
|
||||
seedNode.startApplication();
|
||||
|
||||
injector.getInstance(P2PService.class).addP2PServiceListener(new P2PServiceListener() {
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue