Fixed some broken things from communicator decoupling
This commit is contained in:
parent
bff2595ac9
commit
96af4e8db0
9 changed files with 14 additions and 13 deletions
|
@ -26,9 +26,8 @@ if TYPE_CHECKING:
|
|||
"""
|
||||
|
||||
|
||||
def pick_online_peer(comm_inst):
|
||||
def pick_online_peer(kv: 'DeadSimpleKV'):
|
||||
"""Randomly picks peer from pool without bias (using secrets module)."""
|
||||
kv: "DeadSimpleKV" = comm_inst.shared_state.get_by_string("DeadSimpleKV")
|
||||
ret_data = ''
|
||||
peer_length = len(kv.get('onlinePeers'))
|
||||
if peer_length <= 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue