/** * Creates a PeerGroup for the given context and chain. Blocks will be passed to the chain as they are broadcast * and downloaded. This is probably the constructor you want to use. */ public PeerGroup(Context context, @Nullable AbstractBlockChain chain) { this(context, chain, new NioClientManager()); }
/** * Creates a PeerGroup for the given context and chain. Blocks will be passed to the chain as they are broadcast * and downloaded. This is probably the constructor you want to use. */ public PeerGroup(Context context, @Nullable AbstractBlockChain chain) { this(context, chain, new NioClientManager()); }
/** * Creates a PeerGroup for the given context and chain. Blocks will be passed to the chain as they are broadcast * and downloaded. This is probably the constructor you want to use. */ public PeerGroup(Context context, @Nullable AbstractBlockChain chain) { this(context, chain, new NioClientManager()); }
/** * Creates a PeerGroup for the given context and chain. Blocks will be passed to the chain as they are broadcast * and downloaded. This is probably the constructor you want to use. */ public PeerGroup(Context context, @Nullable AbstractBlockChain chain) { this(context, chain, new NioClientManager()); }
/** See {@link #PeerGroup(Context, AbstractBlockChain)} */ public PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain) { this(Context.getOrCreate(params), chain, new NioClientManager()); }
/** See {@link #PeerGroup(Context, AbstractBlockChain)} */ public PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain) { this(Context.getOrCreate(params), chain, new NioClientManager()); }
/** See {@link #PeerGroup(Context, AbstractBlockChain)} */ public PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain) { this(Context.getOrCreate(params), chain, new NioClientManager()); }
/** See {@link #PeerGroup(Context, AbstractBlockChain)} */ public PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain) { this(Context.getOrCreate(params), chain, new NioClientManager()); }
public TestWithNetworkConnections(ClientType clientType) { this.clientType = clientType; if (clientType == ClientType.NIO_CLIENT_MANAGER) channels = new NioClientManager(); else if (clientType == ClientType.BLOCKING_CLIENT_MANAGER) channels = new BlockingClientManager(); else channels = null; }
NioClientManager clientManager = new NioClientManager(); for (final InetAddress addr : addrs) { InetSocketAddress address = new InetSocketAddress(addr, params.getPort());
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; }
protected void initPeerGroup() { if (clientType == ClientType.NIO_CLIENT_MANAGER) peerGroup = createPeerGroup(new NioClientManager()); else peerGroup = createPeerGroup(new BlockingClientManager()); peerGroup.setPingIntervalMsec(0); // Disable the pings as they just get in the way of most tests. peerGroup.addWallet(wallet); peerGroup.setUseLocalhostPeerWhenPossible(false); // Prevents from connecting to bitcoin nodes on localhost. }