mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Clean up tor files at seed node startup
This commit is contained in:
parent
ad15fcd5c4
commit
9741b79d20
1 changed files with 8 additions and 3 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,7 +146,13 @@ 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");
|
||||
}, log::error);
|
||||
|
||||
seedNode.startApplication();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue