Peter Surda
d635e515b9
- most of the stuff is done so it partially works - disabled pollers other than select (debugging necessary) - can switch in the settings, section network, option asyncore (defaults to False)
12 lines
255 B
Python
12 lines
255 B
Python
import random
|
|
|
|
from bmconfigparser import BMConfigParser
|
|
import knownnodes
|
|
import state
|
|
|
|
def chooseConnection(stream):
|
|
if state.trustedPeer:
|
|
return state.trustedPeer
|
|
else:
|
|
return random.choice(knownnodes.knownNodes[stream].keys())
|