refactored onionrpeers into a module

This commit is contained in:
Kevin Froman 2019-07-12 12:21:08 -05:00
parent ec2f24b257
commit 021fa87f30
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
5 changed files with 95 additions and 58 deletions

View file

@ -36,7 +36,7 @@ def connect_new_peer_to_communicator(comm_inst, peer='', useBootstrap=False):
peerList = comm_inst._core.listAdders()
mainPeerList = comm_inst._core.listAdders()
peerList = onionrpeers.getScoreSortedPeerList(comm_inst._core)
peerList = onionrpeers.get_score_sorted_peer_list(comm_inst._core)
# If we don't have enough peers connected or random chance, select new peers to try
if len(peerList) < 8 or secrets.randbelow(4) == 3: