test_class.declarator: params = UnitTestParams.get()
test_class.modifier: static final
test_class.original_string: static final NetworkParameters params = UnitTestParams.get();
test_class.type: NetworkParameters
test_class.var_name: params
test_class.declarator: connectedPeers
test_class.modifier: private
test_class.original_string: private BlockingQueue<Peer> connectedPeers;
test_class.type: BlockingQueue<Peer>
test_class.var_name: connectedPeers
test_class.declarator: disconnectedPeers
test_class.modifier: private
test_class.original_string: private BlockingQueue<Peer> disconnectedPeers;
test_class.type: BlockingQueue<Peer>
test_class.var_name: disconnectedPeers
test_class.declarator: listener
test_class.modifier: private
test_class.original_string: private PeerEventListener listener;
test_class.type: PeerEventListener
test_class.var_name: listener
test_class.declarator: peerToMessageCount
test_class.modifier: private
test_class.original_string: private Map<Peer, AtomicInteger> peerToMessageCount;
test_class.type: Map<Peer, AtomicInteger>
test_class.var_name: peerToMessageCount
test_class.file: core/src/test/java/com/google/bitcoin/core/PeerGroupTest.java
test_class.identifier: PeerGroupTest
test_class.superclass: extends TestWithPeerGroup
test_case.body: @Test
      public void peerDiscoveryPolling() throws InterruptedException {
          // Check that if peer discovery fails, we keep trying until we have some nodes to talk with.
          final CountDownLatch latch = new CountDownLatch(1);
          final AtomicBoolean result = new AtomicBoolean();
          peerGroup.addPeerDiscovery(new PeerDiscovery() {
              public InetSocketAddress[] getPeers(long unused, TimeUnit unused2) throws PeerDiscoveryException {
                  if (!result.getAndSet(true)) {
                      // Pretend we are not connected to the internet.
                      throw new PeerDiscoveryException("test failure");
                  } else {
                      // Return a bogus address.
                      latch.countDown();
                      return new InetSocketAddress[]{new InetSocketAddress("localhost", 1)};
                  }
              }
              public void shutdown() {
              }
          });
          peerGroup.startAndWait();
          latch.await();
          // Check that we did indeed throw an exception. If we got here it means we threw and then PeerGroup tried
          // again a bit later.
          assertTrue(result.get());
      }
test_case.class_method_signature: PeerGroupTest.peerDiscoveryPolling()
test_case.full_signature: @Test public void peerDiscoveryPolling()
test_case.identifier: peerDiscoveryPolling
test_case.invocations: addPeerDiscovery getAndSet countDown startAndWait await assertTrue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void peerDiscoveryPolling()
focal_class.declarator: DEFAULT_CONNECTIONS = 4
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_CONNECTIONS = 4;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECTIONS
focal_class.declarator: log = LoggerFactory.getLogger(PeerGroup.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(PeerGroup.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: lock = Threading.lock("peergroup")
focal_class.modifier: protected final
focal_class.original_string: protected final ReentrantLock lock = Threading.lock("peergroup");
focal_class.type: ReentrantLock
focal_class.var_name: lock
focal_class.declarator: inactives
focal_class.modifier: @GuardedBy("lock") private final
focal_class.original_string: @GuardedBy("lock") private final PriorityQueue<PeerAddress> inactives;
focal_class.type: PriorityQueue<PeerAddress>
focal_class.var_name: inactives
focal_class.declarator: backoffMap
focal_class.modifier: @GuardedBy("lock") private final
focal_class.original_string: @GuardedBy("lock") private final Map<PeerAddress, ExponentialBackoff> backoffMap;
focal_class.type: Map<PeerAddress, ExponentialBackoff>
focal_class.var_name: backoffMap
focal_class.declarator: peers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Peer> peers;
focal_class.type: CopyOnWriteArrayList<Peer>
focal_class.var_name: peers
focal_class.declarator: pendingPeers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Peer> pendingPeers;
focal_class.type: CopyOnWriteArrayList<Peer>
focal_class.var_name: pendingPeers
focal_class.declarator: channels
focal_class.modifier: private final
focal_class.original_string: private final ClientConnectionManager channels;
focal_class.type: ClientConnectionManager
focal_class.var_name: channels
focal_class.declarator: downloadPeer
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private Peer downloadPeer;
focal_class.type: Peer
focal_class.var_name: downloadPeer
focal_class.declarator: downloadListener
focal_class.modifier: @Nullable @GuardedBy("lock") private
focal_class.original_string: @Nullable @GuardedBy("lock") private PeerEventListener downloadListener;
focal_class.type: PeerEventListener
focal_class.var_name: downloadListener
focal_class.declarator: peerEventListeners
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<ListenerRegistration<PeerEventListener>> peerEventListeners;
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<PeerEventListener>>
focal_class.var_name: peerEventListeners
focal_class.declarator: peerDiscoverers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArraySet<PeerDiscovery> peerDiscoverers;
focal_class.type: CopyOnWriteArraySet<PeerDiscovery>
focal_class.var_name: peerDiscoverers
focal_class.declarator: versionMessage
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private VersionMessage versionMessage;
focal_class.type: VersionMessage
focal_class.var_name: versionMessage
focal_class.declarator: memoryPool
focal_class.modifier: private final
focal_class.original_string: private final MemoryPool memoryPool;
focal_class.type: MemoryPool
focal_class.var_name: memoryPool
focal_class.declarator: maxConnections
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private int maxConnections;
focal_class.type: int
focal_class.var_name: maxConnections
focal_class.declarator: vMinRequiredProtocolVersion = CoinDefinition.MIN_PROTOCOL_VERSION
focal_class.modifier: private volatile
focal_class.original_string: private volatile int vMinRequiredProtocolVersion = CoinDefinition.MIN_PROTOCOL_VERSION;
focal_class.type: int
focal_class.var_name: vMinRequiredProtocolVersion
focal_class.declarator: vPingTimer
focal_class.modifier: private volatile
focal_class.original_string: private volatile Timer vPingTimer;
focal_class.type: Timer
focal_class.var_name: vPingTimer
focal_class.declarator: DEFAULT_PING_INTERVAL_MSEC = 2000
focal_class.modifier: public static final
focal_class.original_string: public static final long DEFAULT_PING_INTERVAL_MSEC = 2000;
focal_class.type: long
focal_class.var_name: DEFAULT_PING_INTERVAL_MSEC
focal_class.declarator: pingIntervalMsec = DEFAULT_PING_INTERVAL_MSEC
focal_class.modifier: private
focal_class.original_string: private long pingIntervalMsec = DEFAULT_PING_INTERVAL_MSEC;
focal_class.type: long
focal_class.var_name: pingIntervalMsec
focal_class.declarator: params
focal_class.modifier: private final
focal_class.original_string: private final NetworkParameters params;
focal_class.type: NetworkParameters
focal_class.var_name: params
focal_class.declarator: chain
focal_class.modifier: private final
focal_class.original_string: private final AbstractBlockChain chain;
focal_class.type: AbstractBlockChain
focal_class.var_name: chain
focal_class.declarator: fastCatchupTimeSecs
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private long fastCatchupTimeSecs;
focal_class.type: long
focal_class.var_name: fastCatchupTimeSecs
focal_class.declarator: wallets
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Wallet> wallets;
focal_class.type: CopyOnWriteArrayList<Wallet>
focal_class.var_name: wallets
focal_class.declarator: peerFilterProviders
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<PeerFilterProvider> peerFilterProviders;
focal_class.type: CopyOnWriteArrayList<PeerFilterProvider>
focal_class.var_name: peerFilterProviders
focal_class.declarator: peerListener = new AbstractPeerEventListener() {
          @Override
          public List<Message> getData(Peer peer, GetDataMessage m) {
              return handleGetData(m);
          }
  
          @Override
          public void onBlocksDownloaded(Peer peer, Block block, int blocksLeft) {
              double rate = checkNotNull(chain).getFalsePositiveRate();
              if (rate > bloomFilterFPRate * MAX_FP_RATE_INCREASE) {
                  log.info("Force update Bloom filter due to high false positive rate");
                  recalculateFastCatchupAndFilter(FilterRecalculateMode.FORCE_SEND);
              }
          }
      }
focal_class.modifier: private final
focal_class.original_string: private final AbstractPeerEventListener peerListener = new AbstractPeerEventListener() {
          @Override
          public List<Message> getData(Peer peer, GetDataMessage m) {
              return handleGetData(m);
          }
  
          @Override
          public void onBlocksDownloaded(Peer peer, Block block, int blocksLeft) {
              double rate = checkNotNull(chain).getFalsePositiveRate();
              if (rate > bloomFilterFPRate * MAX_FP_RATE_INCREASE) {
                  log.info("Force update Bloom filter due to high false positive rate");
                  recalculateFastCatchupAndFilter(FilterRecalculateMode.FORCE_SEND);
              }
          }
      };
focal_class.type: AbstractPeerEventListener
focal_class.var_name: peerListener
focal_class.declarator: minBroadcastConnections = CoinDefinition.minBroadcastConnections
focal_class.modifier: private
focal_class.original_string: private int minBroadcastConnections = CoinDefinition.minBroadcastConnections;
focal_class.type: int
focal_class.var_name: minBroadcastConnections
focal_class.declarator: bloomSendIfChanged = new Runnable() {
          @Override public void run() {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      }
focal_class.modifier: private
focal_class.original_string: private Runnable bloomSendIfChanged = new Runnable() {
          @Override public void run() {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      };
focal_class.type: Runnable
focal_class.var_name: bloomSendIfChanged
focal_class.declarator: bloomDontSend = new Runnable() {
          @Override public void run() {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND);
          }
      }
focal_class.modifier: private
focal_class.original_string: private Runnable bloomDontSend = new Runnable() {
          @Override public void run() {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND);
          }
      };
focal_class.type: Runnable
focal_class.var_name: bloomDontSend
focal_class.declarator: walletEventListener = new AbstractWalletEventListener() {
          private void queueRecalc(boolean andTransmit) {
              if (andTransmit) {
                  log.info("Queuing recalc of the Bloom filter due to new keys or scripts becoming available");
                  Uninterruptibles.putUninterruptibly(jobQueue, bloomSendIfChanged);
              } else {
                  log.info("Queuing recalc of the Bloom filter due to observing a pay to pubkey output on a relevant tx");
                  Uninterruptibles.putUninterruptibly(jobQueue, bloomDontSend);
              }
          }
  
          @Override public void onScriptsAdded(Wallet wallet, List<Script> scripts) {
              queueRecalc(true);
          }
  
          @Override public void onKeysAdded(Wallet wallet, List<ECKey> keys) {
              queueRecalc(true);
          }
  
          @Override
          public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) {
              // We received a relevant transaction. We MAY need to recalculate and resend the Bloom filter, but only
              // if we have received a transaction that includes a relevant pay-to-pubkey output.
              //
              // The reason is that pay-to-pubkey outputs, when spent, will not repeat any data we can predict in their
              // inputs. So a remote peer will update the Bloom filter for us when such an output is seen matching the
              // existing filter, so that it includes the tx hash in which the pay-to-pubkey output was observed. Thus
              // the spending transaction will always match (due to the outpoint structure).
              //
              // Unfortunately, whilst this is required for correct sync of the chain in blocks, there are two edge cases.
              //
              // (1) If a wallet receives a relevant, confirmed p2pubkey output that was not broadcast across the network,
              // for example in a coinbase transaction, then the node that's serving us the chain will update its filter
              // but the rest will not. If another transaction then spends it, the other nodes won't match/relay it.
              //
              // (2) If we receive a p2pubkey output broadcast across the network, all currently connected nodes will see
              // it and update their filter themselves, but any newly connected nodes will receive the last filter we
              // calculated, which would not include this transaction.
              //
              // For this reason we check if the transaction contained any relevant pay to pubkeys and force a recalc
              // and possibly retransmit if so. The recalculation process will end up including the tx hash into the
              // filter. In case (1), we need to retransmit the filter to the connected peers. In case (2), we don't
              // and shouldn't, we should just recalculate and cache the new filter for next time.
              for (TransactionOutput output : tx.getOutputs()) {
                  if (output.getScriptPubKey().isSentToRawPubKey() && output.isMine(wallet)) {
                      if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING)
                          queueRecalc(true);
                      else
                          queueRecalc(false);
                      return;
                  }
              }
          }
      }
focal_class.modifier: private
focal_class.original_string: private AbstractWalletEventListener walletEventListener = new AbstractWalletEventListener() {
          private void queueRecalc(boolean andTransmit) {
              if (andTransmit) {
                  log.info("Queuing recalc of the Bloom filter due to new keys or scripts becoming available");
                  Uninterruptibles.putUninterruptibly(jobQueue, bloomSendIfChanged);
              } else {
                  log.info("Queuing recalc of the Bloom filter due to observing a pay to pubkey output on a relevant tx");
                  Uninterruptibles.putUninterruptibly(jobQueue, bloomDontSend);
              }
          }
  
          @Override public void onScriptsAdded(Wallet wallet, List<Script> scripts) {
              queueRecalc(true);
          }
  
          @Override public void onKeysAdded(Wallet wallet, List<ECKey> keys) {
              queueRecalc(true);
          }
  
          @Override
          public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) {
              // We received a relevant transaction. We MAY need to recalculate and resend the Bloom filter, but only
              // if we have received a transaction that includes a relevant pay-to-pubkey output.
              //
              // The reason is that pay-to-pubkey outputs, when spent, will not repeat any data we can predict in their
              // inputs. So a remote peer will update the Bloom filter for us when such an output is seen matching the
              // existing filter, so that it includes the tx hash in which the pay-to-pubkey output was observed. Thus
              // the spending transaction will always match (due to the outpoint structure).
              //
              // Unfortunately, whilst this is required for correct sync of the chain in blocks, there are two edge cases.
              //
              // (1) If a wallet receives a relevant, confirmed p2pubkey output that was not broadcast across the network,
              // for example in a coinbase transaction, then the node that's serving us the chain will update its filter
              // but the rest will not. If another transaction then spends it, the other nodes won't match/relay it.
              //
              // (2) If we receive a p2pubkey output broadcast across the network, all currently connected nodes will see
              // it and update their filter themselves, but any newly connected nodes will receive the last filter we
              // calculated, which would not include this transaction.
              //
              // For this reason we check if the transaction contained any relevant pay to pubkeys and force a recalc
              // and possibly retransmit if so. The recalculation process will end up including the tx hash into the
              // filter. In case (1), we need to retransmit the filter to the connected peers. In case (2), we don't
              // and shouldn't, we should just recalculate and cache the new filter for next time.
              for (TransactionOutput output : tx.getOutputs()) {
                  if (output.getScriptPubKey().isSentToRawPubKey() && output.isMine(wallet)) {
                      if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING)
                          queueRecalc(true);
                      else
                          queueRecalc(false);
                      return;
                  }
              }
          }
      };
focal_class.type: AbstractWalletEventListener
focal_class.var_name: walletEventListener
focal_class.declarator: peerBackoffParams = new ExponentialBackoff.Params(1000, 1.5f, 10 * 60 * 1000)
focal_class.modifier: private
focal_class.original_string: private ExponentialBackoff.Params peerBackoffParams = new ExponentialBackoff.Params(1000, 1.5f, 10 * 60 * 1000);
focal_class.type: ExponentialBackoff.Params
focal_class.var_name: peerBackoffParams
focal_class.declarator: groupBackoff = new ExponentialBackoff(new ExponentialBackoff.Params(100, 1.1f, 30 * 1000))
focal_class.modifier: private
focal_class.original_string: private ExponentialBackoff groupBackoff = new ExponentialBackoff(new ExponentialBackoff.Params(100, 1.1f, 30 * 1000));
focal_class.type: ExponentialBackoff
focal_class.var_name: groupBackoff
focal_class.declarator: jobQueue = new LinkedBlockingQueue<Runnable>()
focal_class.modifier: private
focal_class.original_string: private LinkedBlockingQueue<Runnable> jobQueue = new LinkedBlockingQueue<Runnable>();
focal_class.type: LinkedBlockingQueue<Runnable>
focal_class.var_name: jobQueue
focal_class.declarator: runningBroadcasts
focal_class.modifier: private final
focal_class.original_string: private final Set<TransactionBroadcast> runningBroadcasts;
focal_class.type: Set<TransactionBroadcast>
focal_class.var_name: runningBroadcasts
focal_class.declarator: startupListener = new PeerStartupListener()
focal_class.original_string: PeerEventListener startupListener = new PeerStartupListener();
focal_class.type: PeerEventListener
focal_class.var_name: startupListener
focal_class.declarator: bloomFilter
focal_class.modifier: private
focal_class.original_string: private BloomFilter bloomFilter;
focal_class.type: BloomFilter
focal_class.var_name: bloomFilter
focal_class.declarator: DEFAULT_BLOOM_FILTER_FP_RATE = 0.0005
focal_class.modifier: public static final
focal_class.original_string: public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.0005;
focal_class.type: double
focal_class.var_name: DEFAULT_BLOOM_FILTER_FP_RATE
focal_class.declarator: MAX_FP_RATE_INCREASE = 2.0f
focal_class.modifier: public static final
focal_class.original_string: public static final double MAX_FP_RATE_INCREASE = 2.0f;
focal_class.type: double
focal_class.var_name: MAX_FP_RATE_INCREASE
focal_class.declarator: bloomFilterFPRate = DEFAULT_BLOOM_FILTER_FP_RATE
focal_class.modifier: private
focal_class.original_string: private double bloomFilterFPRate = DEFAULT_BLOOM_FILTER_FP_RATE;
focal_class.type: double
focal_class.var_name: bloomFilterFPRate
focal_class.declarator: bloomFilterTweak = (long) (Math.random() * Long.MAX_VALUE)
focal_class.modifier: private final
focal_class.original_string: private final long bloomFilterTweak = (long) (Math.random() * Long.MAX_VALUE);
focal_class.type: long
focal_class.var_name: bloomFilterTweak
focal_class.declarator: lastBloomFilterElementCount
focal_class.modifier: private
focal_class.original_string: private int lastBloomFilterElementCount;
focal_class.type: int
focal_class.var_name: lastBloomFilterElementCount
focal_class.declarator: DEFAULT_CONNECT_TIMEOUT_MILLIS = 5000
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 5000;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECT_TIMEOUT_MILLIS
focal_class.declarator: vConnectTimeoutMillis = DEFAULT_CONNECT_TIMEOUT_MILLIS
focal_class.modifier: private volatile
focal_class.original_string: private volatile int vConnectTimeoutMillis = DEFAULT_CONNECT_TIMEOUT_MILLIS;
focal_class.type: int
focal_class.var_name: vConnectTimeoutMillis
focal_class.declarator: triggerConnectionsJob = new Runnable() {
          @Override
          public void run() {
              // We have to test the condition at the end, because during startup we need to run this at least once
              // when isRunning() can return false.
              do {
                  try {
                      connectToAnyPeer();
                  } catch(PeerDiscoveryException e) {
                      groupBackoff.trackFailure();
                  }
              } while (isRunning() && countConnectedAndPendingPeers() < getMaxConnections());
          }
      }
focal_class.modifier: private
focal_class.original_string: private Runnable triggerConnectionsJob = new Runnable() {
          @Override
          public void run() {
              // We have to test the condition at the end, because during startup we need to run this at least once
              // when isRunning() can return false.
              do {
                  try {
                      connectToAnyPeer();
                  } catch(PeerDiscoveryException e) {
                      groupBackoff.trackFailure();
                  }
              } while (isRunning() && countConnectedAndPendingPeers() < getMaxConnections());
          }
      };
focal_class.type: Runnable
focal_class.var_name: triggerConnectionsJob
focal_class.file: core/src/main/java/com/google/bitcoin/core/PeerGroup.java
focal_class.identifier: PeerGroup
focal_class.interfaces: implements TransactionBroadcaster
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params)
focal_class.full_signature: public  PeerGroup(NetworkParameters params)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params)
focal_class.signature:  PeerGroup(NetworkParameters params)
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.full_signature: public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.signature:  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.full_signature: public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.signature:  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.class_method_signature: PeerGroup.setMaxConnections(int maxConnections)
focal_class.full_signature: public void setMaxConnections(int maxConnections)
focal_class.identifier: setMaxConnections
focal_class.modifiers: public
focal_class.parameters: (int maxConnections)
focal_class.return: void
focal_class.signature: void setMaxConnections(int maxConnections)
focal_class.class_method_signature: PeerGroup.triggerConnections()
focal_class.full_signature: private void triggerConnections()
focal_class.identifier: triggerConnections
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void triggerConnections()
focal_class.class_method_signature: PeerGroup.getMaxConnections()
focal_class.full_signature: public int getMaxConnections()
focal_class.identifier: getMaxConnections
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxConnections()
focal_class.class_method_signature: PeerGroup.handleGetData(GetDataMessage m)
focal_class.full_signature: private List<Message> handleGetData(GetDataMessage m)
focal_class.identifier: handleGetData
focal_class.modifiers: private
focal_class.parameters: (GetDataMessage m)
focal_class.return: List<Message>
focal_class.signature: List<Message> handleGetData(GetDataMessage m)
focal_class.class_method_signature: PeerGroup.setVersionMessage(VersionMessage ver)
focal_class.full_signature: public void setVersionMessage(VersionMessage ver)
focal_class.identifier: setVersionMessage
focal_class.modifiers: public
focal_class.parameters: (VersionMessage ver)
focal_class.return: void
focal_class.signature: void setVersionMessage(VersionMessage ver)
focal_class.class_method_signature: PeerGroup.getVersionMessage()
focal_class.full_signature: public VersionMessage getVersionMessage()
focal_class.identifier: getVersionMessage
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: VersionMessage
focal_class.signature: VersionMessage getVersionMessage()
focal_class.class_method_signature: PeerGroup.setUserAgent(String name, String version, @Nullable String comments)
focal_class.full_signature: public void setUserAgent(String name, String version, @Nullable String comments)
focal_class.identifier: setUserAgent
focal_class.modifiers: public
focal_class.parameters: (String name, String version, @Nullable String comments)
focal_class.return: void
focal_class.signature: void setUserAgent(String name, String version, @Nullable String comments)
focal_class.class_method_signature: PeerGroup.updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.full_signature: private void updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.identifier: updateVersionMessageRelayTxesBeforeFilter
focal_class.modifiers: private
focal_class.parameters: (VersionMessage ver)
focal_class.return: void
focal_class.signature: void updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.class_method_signature: PeerGroup.setUserAgent(String name, String version)
focal_class.full_signature: public void setUserAgent(String name, String version)
focal_class.identifier: setUserAgent
focal_class.modifiers: public
focal_class.parameters: (String name, String version)
focal_class.return: void
focal_class.signature: void setUserAgent(String name, String version)
focal_class.class_method_signature: PeerGroup.addEventListener(PeerEventListener listener, Executor executor)
focal_class.full_signature: public void addEventListener(PeerEventListener listener, Executor executor)
focal_class.identifier: addEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerEventListener listener, Executor executor)
focal_class.return: void
focal_class.signature: void addEventListener(PeerEventListener listener, Executor executor)
focal_class.class_method_signature: PeerGroup.addEventListener(PeerEventListener listener)
focal_class.full_signature: public void addEventListener(PeerEventListener listener)
focal_class.identifier: addEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerEventListener listener)
focal_class.return: void
focal_class.signature: void addEventListener(PeerEventListener listener)
focal_class.class_method_signature: PeerGroup.removeEventListener(PeerEventListener listener)
focal_class.full_signature: public boolean removeEventListener(PeerEventListener listener)
focal_class.identifier: removeEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeEventListener(PeerEventListener listener)
focal_class.class_method_signature: PeerGroup.clearEventListeners()
focal_class.full_signature: public void clearEventListeners()
focal_class.identifier: clearEventListeners
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearEventListeners()
focal_class.class_method_signature: PeerGroup.getConnectedPeers()
focal_class.full_signature: public List<Peer> getConnectedPeers()
focal_class.identifier: getConnectedPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Peer>
focal_class.signature: List<Peer> getConnectedPeers()
focal_class.class_method_signature: PeerGroup.getPendingPeers()
focal_class.full_signature: public List<Peer> getPendingPeers()
focal_class.identifier: getPendingPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Peer>
focal_class.signature: List<Peer> getPendingPeers()
focal_class.class_method_signature: PeerGroup.addAddress(PeerAddress peerAddress)
focal_class.full_signature: public void addAddress(PeerAddress peerAddress)
focal_class.identifier: addAddress
focal_class.modifiers: public
focal_class.parameters: (PeerAddress peerAddress)
focal_class.return: void
focal_class.signature: void addAddress(PeerAddress peerAddress)
focal_class.class_method_signature: PeerGroup.addInactive(PeerAddress peerAddress)
focal_class.full_signature: private void addInactive(PeerAddress peerAddress)
focal_class.identifier: addInactive
focal_class.modifiers: private
focal_class.parameters: (PeerAddress peerAddress)
focal_class.return: void
focal_class.signature: void addInactive(PeerAddress peerAddress)
focal_class.class_method_signature: PeerGroup.addAddress(InetAddress address)
focal_class.full_signature: public void addAddress(InetAddress address)
focal_class.identifier: addAddress
focal_class.modifiers: public
focal_class.parameters: (InetAddress address)
focal_class.return: void
focal_class.signature: void addAddress(InetAddress address)
focal_class.class_method_signature: PeerGroup.addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.full_signature: public void addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.identifier: addPeerDiscovery
focal_class.modifiers: public
focal_class.parameters: (PeerDiscovery peerDiscovery)
focal_class.return: void
focal_class.signature: void addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.class_method_signature: PeerGroup.discoverPeers()
focal_class.full_signature: protected void discoverPeers()
focal_class.identifier: discoverPeers
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void discoverPeers()
focal_class.class_method_signature: PeerGroup.run()
focal_class.full_signature: @Override protected void run()
focal_class.identifier: run
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: PeerGroup.waitForJobQueue()
focal_class.full_signature: @VisibleForTesting void waitForJobQueue()
focal_class.identifier: waitForJobQueue
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void waitForJobQueue()
focal_class.class_method_signature: PeerGroup.countConnectedAndPendingPeers()
focal_class.full_signature: private int countConnectedAndPendingPeers()
focal_class.identifier: countConnectedAndPendingPeers
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int countConnectedAndPendingPeers()
focal_class.class_method_signature: PeerGroup.connectToAnyPeer()
focal_class.full_signature: protected void connectToAnyPeer()
focal_class.identifier: connectToAnyPeer
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void connectToAnyPeer()
focal_class.class_method_signature: PeerGroup.haveReadyInactivePeer(long nowMillis)
focal_class.full_signature: private boolean haveReadyInactivePeer(long nowMillis)
focal_class.identifier: haveReadyInactivePeer
focal_class.modifiers: private
focal_class.parameters: (long nowMillis)
focal_class.return: boolean
focal_class.signature: boolean haveReadyInactivePeer(long nowMillis)
focal_class.class_method_signature: PeerGroup.startUp()
focal_class.full_signature: @Override protected void startUp()
focal_class.identifier: startUp
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startUp()
focal_class.class_method_signature: PeerGroup.shutDown()
focal_class.full_signature: @Override protected void shutDown()
focal_class.identifier: shutDown
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutDown()
focal_class.class_method_signature: PeerGroup.triggerShutdown()
focal_class.full_signature: @Override protected void triggerShutdown()
focal_class.identifier: triggerShutdown
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void triggerShutdown()
focal_class.class_method_signature: PeerGroup.addWallet(Wallet wallet)
focal_class.full_signature: public void addWallet(Wallet wallet)
focal_class.identifier: addWallet
focal_class.modifiers: public
focal_class.parameters: (Wallet wallet)
focal_class.return: void
focal_class.signature: void addWallet(Wallet wallet)
focal_class.class_method_signature: PeerGroup.addPeerFilterProvider(PeerFilterProvider provider)
focal_class.full_signature: public void addPeerFilterProvider(PeerFilterProvider provider)
focal_class.identifier: addPeerFilterProvider
focal_class.modifiers: public
focal_class.parameters: (PeerFilterProvider provider)
focal_class.return: void
focal_class.signature: void addPeerFilterProvider(PeerFilterProvider provider)
focal_class.class_method_signature: PeerGroup.removeWallet(Wallet wallet)
focal_class.full_signature: public void removeWallet(Wallet wallet)
focal_class.identifier: removeWallet
focal_class.modifiers: public
focal_class.parameters: (Wallet wallet)
focal_class.return: void
focal_class.signature: void removeWallet(Wallet wallet)
focal_class.class_method_signature: PeerGroup.recalculateFastCatchupAndFilter(FilterRecalculateMode mode)
focal_class.full_signature: public void recalculateFastCatchupAndFilter(FilterRecalculateMode mode)
focal_class.identifier: recalculateFastCatchupAndFilter
focal_class.modifiers: public
focal_class.parameters: (FilterRecalculateMode mode)
focal_class.return: void
focal_class.signature: void recalculateFastCatchupAndFilter(FilterRecalculateMode mode)
focal_class.class_method_signature: PeerGroup.setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.full_signature: public void setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.identifier: setBloomFilterFalsePositiveRate
focal_class.modifiers: public
focal_class.parameters: (double bloomFilterFPRate)
focal_class.return: void
focal_class.signature: void setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.class_method_signature: PeerGroup.numConnectedPeers()
focal_class.full_signature: public int numConnectedPeers()
focal_class.identifier: numConnectedPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int numConnectedPeers()
focal_class.class_method_signature: PeerGroup.connectTo(InetSocketAddress address)
focal_class.full_signature: @Nullable public Peer connectTo(InetSocketAddress address)
focal_class.identifier: connectTo
focal_class.modifiers: @Nullable public
focal_class.parameters: (InetSocketAddress address)
focal_class.return: Peer
focal_class.signature: Peer connectTo(InetSocketAddress address)
focal_class.class_method_signature: PeerGroup.connectTo(PeerAddress address, boolean incrementMaxConnections)
focal_class.full_signature: @Nullable protected Peer connectTo(PeerAddress address, boolean incrementMaxConnections)
focal_class.identifier: connectTo
focal_class.modifiers: @Nullable protected
focal_class.parameters: (PeerAddress address, boolean incrementMaxConnections)
focal_class.return: Peer
focal_class.signature: Peer connectTo(PeerAddress address, boolean incrementMaxConnections)
focal_class.class_method_signature: PeerGroup.setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.full_signature: public void setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.identifier: setConnectTimeoutMillis
focal_class.modifiers: public
focal_class.parameters: (int connectTimeoutMillis)
focal_class.return: void
focal_class.signature: void setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.class_method_signature: PeerGroup.startBlockChainDownload(PeerEventListener listener)
focal_class.full_signature: public void startBlockChainDownload(PeerEventListener listener)
focal_class.identifier: startBlockChainDownload
focal_class.modifiers: public
focal_class.parameters: (PeerEventListener listener)
focal_class.return: void
focal_class.signature: void startBlockChainDownload(PeerEventListener listener)
focal_class.class_method_signature: PeerGroup.downloadBlockChain()
focal_class.full_signature: public void downloadBlockChain()
focal_class.identifier: downloadBlockChain
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void downloadBlockChain()
focal_class.class_method_signature: PeerGroup.handleNewPeer(final Peer peer)
focal_class.full_signature: protected void handleNewPeer(final Peer peer)
focal_class.identifier: handleNewPeer
focal_class.modifiers: protected
focal_class.parameters: (final Peer peer)
focal_class.return: void
focal_class.signature: void handleNewPeer(final Peer peer)
focal_class.class_method_signature: PeerGroup.setupPingingForNewPeer(final Peer peer)
focal_class.full_signature: private void setupPingingForNewPeer(final Peer peer)
focal_class.identifier: setupPingingForNewPeer
focal_class.modifiers: private
focal_class.parameters: (final Peer peer)
focal_class.return: void
focal_class.signature: void setupPingingForNewPeer(final Peer peer)
focal_class.class_method_signature: PeerGroup.setDownloadPeer(@Nullable Peer peer)
focal_class.full_signature: private void setDownloadPeer(@Nullable Peer peer)
focal_class.identifier: setDownloadPeer
focal_class.modifiers: private
focal_class.parameters: (@Nullable Peer peer)
focal_class.return: void
focal_class.signature: void setDownloadPeer(@Nullable Peer peer)
focal_class.class_method_signature: PeerGroup.getMemoryPool()
focal_class.full_signature: public MemoryPool getMemoryPool()
focal_class.identifier: getMemoryPool
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: MemoryPool
focal_class.signature: MemoryPool getMemoryPool()
focal_class.class_method_signature: PeerGroup.setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.full_signature: public void setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.identifier: setFastCatchupTimeSecs
focal_class.modifiers: public
focal_class.parameters: (long secondsSinceEpoch)
focal_class.return: void
focal_class.signature: void setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.class_method_signature: PeerGroup.getFastCatchupTimeSecs()
focal_class.full_signature: public long getFastCatchupTimeSecs()
focal_class.identifier: getFastCatchupTimeSecs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getFastCatchupTimeSecs()
focal_class.class_method_signature: PeerGroup.handlePeerDeath(final Peer peer)
focal_class.full_signature: protected void handlePeerDeath(final Peer peer)
focal_class.identifier: handlePeerDeath
focal_class.modifiers: protected
focal_class.parameters: (final Peer peer)
focal_class.return: void
focal_class.signature: void handlePeerDeath(final Peer peer)
focal_class.class_method_signature: PeerGroup.startBlockChainDownloadFromPeer(Peer peer)
focal_class.full_signature: private void startBlockChainDownloadFromPeer(Peer peer)
focal_class.identifier: startBlockChainDownloadFromPeer
focal_class.modifiers: private
focal_class.parameters: (Peer peer)
focal_class.return: void
focal_class.signature: void startBlockChainDownloadFromPeer(Peer peer)
focal_class.class_method_signature: PeerGroup.waitForPeers(final int numPeers)
focal_class.full_signature: public ListenableFuture<PeerGroup> waitForPeers(final int numPeers)
focal_class.identifier: waitForPeers
focal_class.modifiers: public
focal_class.parameters: (final int numPeers)
focal_class.return: ListenableFuture<PeerGroup>
focal_class.signature: ListenableFuture<PeerGroup> waitForPeers(final int numPeers)
focal_class.class_method_signature: PeerGroup.getMinBroadcastConnections()
focal_class.full_signature: public int getMinBroadcastConnections()
focal_class.identifier: getMinBroadcastConnections
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMinBroadcastConnections()
focal_class.class_method_signature: PeerGroup.setMinBroadcastConnections(int value)
focal_class.full_signature: public void setMinBroadcastConnections(int value)
focal_class.identifier: setMinBroadcastConnections
focal_class.modifiers: public
focal_class.parameters: (int value)
focal_class.return: void
focal_class.signature: void setMinBroadcastConnections(int value)
focal_class.class_method_signature: PeerGroup.broadcastTransaction(final Transaction tx)
focal_class.full_signature: public ListenableFuture<Transaction> broadcastTransaction(final Transaction tx)
focal_class.identifier: broadcastTransaction
focal_class.modifiers: public
focal_class.parameters: (final Transaction tx)
focal_class.return: ListenableFuture<Transaction>
focal_class.signature: ListenableFuture<Transaction> broadcastTransaction(final Transaction tx)
focal_class.class_method_signature: PeerGroup.broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.full_signature: public ListenableFuture<Transaction> broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.identifier: broadcastTransaction
focal_class.modifiers: public
focal_class.parameters: (final Transaction tx, final int minConnections)
focal_class.return: ListenableFuture<Transaction>
focal_class.signature: ListenableFuture<Transaction> broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.class_method_signature: PeerGroup.getPingIntervalMsec()
focal_class.full_signature: public long getPingIntervalMsec()
focal_class.identifier: getPingIntervalMsec
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getPingIntervalMsec()
focal_class.class_method_signature: PeerGroup.setPingIntervalMsec(long pingIntervalMsec)
focal_class.full_signature: public void setPingIntervalMsec(long pingIntervalMsec)
focal_class.identifier: setPingIntervalMsec
focal_class.modifiers: public
focal_class.parameters: (long pingIntervalMsec)
focal_class.return: void
focal_class.signature: void setPingIntervalMsec(long pingIntervalMsec)
focal_class.class_method_signature: PeerGroup.setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.full_signature: public void setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.identifier: setMinRequiredProtocolVersion
focal_class.modifiers: public
focal_class.parameters: (int minRequiredProtocolVersion)
focal_class.return: void
focal_class.signature: void setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.class_method_signature: PeerGroup.getMinRequiredProtocolVersion()
focal_class.full_signature: public int getMinRequiredProtocolVersion()
focal_class.identifier: getMinRequiredProtocolVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMinRequiredProtocolVersion()
focal_class.class_method_signature: PeerGroup.getMostCommonChainHeight()
focal_class.full_signature: public int getMostCommonChainHeight()
focal_class.identifier: getMostCommonChainHeight
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMostCommonChainHeight()
focal_class.class_method_signature: PeerGroup.getMostCommonChainHeight(final List<Peer> peers)
focal_class.full_signature: public static int getMostCommonChainHeight(final List<Peer> peers)
focal_class.identifier: getMostCommonChainHeight
focal_class.modifiers: public static
focal_class.parameters: (final List<Peer> peers)
focal_class.return: int
focal_class.signature: int getMostCommonChainHeight(final List<Peer> peers)
focal_class.class_method_signature: PeerGroup.selectDownloadPeer(List<Peer> peers)
focal_class.full_signature: @Nullable protected Peer selectDownloadPeer(List<Peer> peers)
focal_class.identifier: selectDownloadPeer
focal_class.modifiers: @Nullable protected
focal_class.parameters: (List<Peer> peers)
focal_class.return: Peer
focal_class.signature: Peer selectDownloadPeer(List<Peer> peers)
focal_class.class_method_signature: PeerGroup.getDownloadPeer()
focal_class.full_signature: public Peer getDownloadPeer()
focal_class.identifier: getDownloadPeer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Peer
focal_class.signature: Peer getDownloadPeer()
focal_class.superclass: extends AbstractExecutionThreadService
focal_method.body: public void addPeerDiscovery(PeerDiscovery peerDiscovery) {
          lock.lock();
          try {
              if (getMaxConnections() == 0)
                  setMaxConnections(DEFAULT_CONNECTIONS);
              peerDiscoverers.add(peerDiscovery);
          } finally {
              lock.unlock();
          }
      }
focal_method.class_method_signature: PeerGroup.addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_method.full_signature: public void addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_method.identifier: addPeerDiscovery
focal_method.invocations: lock getMaxConnections setMaxConnections add unlock
focal_method.modifiers: public
focal_method.parameters: (PeerDiscovery peerDiscovery)
focal_method.return: void
focal_method.signature: void addPeerDiscovery(PeerDiscovery peerDiscovery)