Add allRelaysActive output to network info
This commit is contained in:
@@ -62,6 +62,18 @@ def getActiveRelays(net):
|
||||
return activeRelays
|
||||
|
||||
|
||||
def relayIsActive(net, num):
|
||||
"""
|
||||
Check if a relay is active.
|
||||
:param net: network
|
||||
:param num: relay number
|
||||
:rtype: bool
|
||||
:return: True if relay is active, False otherwise
|
||||
"""
|
||||
activeRelays = getActiveRelays(net)
|
||||
return num in activeRelays
|
||||
|
||||
|
||||
def allRelaysActive(net):
|
||||
"""
|
||||
Check if all enabled relays are active and authenticated.
|
||||
|
||||
Reference in New Issue
Block a user