MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / reRandomiseStems

Method reRandomiseStems

src/network/dandelion.py:131–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 invQueue.put((row[0], row[1], row[2]))
130
131 def reRandomiseStems(self):
132 with self.lock:
133 try:
134 # random two connections
135 self.stem = sample(network.connectionpool.BMConnectionPool().outboundConnections.values(), MAX_STEMS)
136 # not enough stems available
137 except ValueError:
138 self.stem = network.connectionpool.BMConnectionPool().outboundConnections.values()
139 self.nodeMap = {}
140 # hashMap stays to cater for pending stems
141 self.refresh = time() + REASSIGN_INTERVAL

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected