@Override public void run() { try { log.info("Starting ..."); channels.startAsync(); channels.awaitRunning(); triggerConnections(); setupPinging(); } catch (Throwable e) { log.error("Exception when starting up", e); // The executor swallows exceptions :( } } });
@Override public void run() { try { log.info("Starting ..."); channels.startAsync(); channels.awaitRunning(); triggerConnections(); setupPinging(); } catch (Throwable e) { log.error("Exception when starting up", e); // The executor swallows exceptions :( } } });
@Override public void run() { try { log.info("Starting ..."); if (torClient != null) { log.info("Starting Tor/Orchid ..."); torClient.start(); try { torClient.waitUntilReady(TOR_TIMEOUT_SECONDS * 1000); } catch (Exception e) { throw new RuntimeException(e); } log.info("Tor ready"); } channels.startAsync(); channels.awaitRunning(); triggerConnections(); setupPinging(); } catch (Throwable e) { log.error("Exception when starting up", e); // The executor swallows exceptions :( } } });
@Override public void run() { try { log.info("Starting ..."); if (torClient != null) { log.info("Starting Tor/Orchid ..."); torClient.start(); try { torClient.waitUntilReady(TOR_TIMEOUT_SECONDS * 1000); } catch (Exception e) { throw new RuntimeException(e); } log.info("Tor ready"); } channels.startAsync(); channels.awaitRunning(); triggerConnections(); setupPinging(); } catch (Throwable e) { log.error("Exception when starting up", e); // The executor swallows exceptions :( } } });
public NetworkAbstractionTests(Integer clientType) throws Exception { this.clientType = clientType; if (clientType == 0) { channels = new NioClientManager(); channels.startAsync(); } else if (clientType == 1) { channels = new BlockingClientManager(); channels.startAsync(); } else channels = null; }
public void setUp(BlockStore blockStore) throws Exception { BriefLogFormatter.init(); Context.propagate(new Context(PARAMS, 100, Coin.ZERO, false)); this.blockStore = blockStore; // Allow subclasses to override the wallet object with their own. if (wallet == null) { wallet = new Wallet(PARAMS); key = wallet.freshReceiveKey(); address = key.toAddress(PARAMS); } blockChain = new BlockChain(PARAMS, wallet, blockStore); startPeerServers(); if (clientType == ClientType.NIO_CLIENT_MANAGER || clientType == ClientType.BLOCKING_CLIENT_MANAGER) { channels.startAsync(); channels.awaitRunning(); } socketAddress = new InetSocketAddress("127.0.0.1", 1111); }