mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-03 04:06:23 -04:00
Handle offer removal on disconnect, cleanup
This commit is contained in:
parent
db363fac48
commit
17c780639f
69 changed files with 377 additions and 367 deletions
|
@ -3,7 +3,6 @@ package io.bitsquare.p2p.seed;
|
|||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import io.bitsquare.app.BitsquareEnvironment;
|
||||
import io.bitsquare.common.UserThread;
|
||||
import io.bitsquare.trade.offer.OfferBookService;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -15,8 +14,7 @@ import java.util.concurrent.ThreadFactory;
|
|||
public class SeedNodeMain {
|
||||
private static final Logger log = LoggerFactory.getLogger(SeedNodeMain.class);
|
||||
|
||||
public static final boolean USE_DETAILED_LOGGING = true;
|
||||
private OfferBookService offerBookService;
|
||||
private static final boolean USE_DETAILED_LOGGING = true;
|
||||
|
||||
private SeedNode seedNode;
|
||||
|
||||
|
@ -26,7 +24,7 @@ public class SeedNodeMain {
|
|||
new SeedNodeMain(args);
|
||||
}
|
||||
|
||||
public SeedNodeMain(String[] args) throws InterruptedException {
|
||||
private SeedNodeMain(String[] args) throws InterruptedException {
|
||||
final ThreadFactory threadFactory = new ThreadFactoryBuilder()
|
||||
.setNameFormat("SeedNodeMain")
|
||||
.setDaemon(true)
|
||||
|
@ -50,10 +48,6 @@ public class SeedNodeMain {
|
|||
seedNode = new SeedNode(BitsquareEnvironment.defaultUserDataDir());
|
||||
seedNode.processArgs(args);
|
||||
seedNode.createAndStartP2PService(USE_DETAILED_LOGGING);
|
||||
|
||||
// We need the offerbook service to handle the case when the offerer is in sleep/hibernate mode and
|
||||
// we want to remove his offers and not wait until TTL is over.
|
||||
offerBookService = new OfferBookService(seedNode.getSeedNodeP2PService());
|
||||
} catch (Throwable t) {
|
||||
log.error("Executing task failed. " + t.getMessage());
|
||||
t.printStackTrace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue