mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-17 04:47:28 +00:00
Add a numConnectedPeers() accessor to PeerGroup.
This commit is contained in:
committed by
Miron Cuperman
parent
e2885e816e
commit
49729fe0b0
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user