Add a numConnectedPeers() accessor to PeerGroup.

This commit is contained in:
Mike Hearn
2011-12-21 15:55:02 +01:00
committed by Miron Cuperman
parent e2885e816e
commit 49729fe0b0

View File

@@ -285,6 +285,11 @@ public class PeerGroup {
removeEventListener(wallet.getPeerEventListener());
}
/** Returns how many remote nodes this peer group is connected to. */
public int numConnectedPeers() {
return peers.size();
}
private final class PeerExecutionRunnable implements Runnable {
/*
* Repeatedly get the next peer address from the inactive queue and try to connect.