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

Method maybeRemoveStem

src/network/dandelion.py:87–96  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

85
86
87 def maybeRemoveStem(self, connection):
88 # is the stem active?
89 with self.lock:
90 if connection in self.stem:
91 self.stem.remove(connection)
92 # active mappings to pointing to the removed node
93 for k in (k for k, v in self.nodeMap.iteritems() if v == connection):
94 self.nodeMap[k] = None
95 for k, v in {k: v for k, v in self.hashMap.iteritems() if v.child == connection}.iteritems():
96 self.hashMap[k] = Stem(None, v.stream, self.poissonTimeout())
97
98 def pickStem(self, parent=None):
99 try:

Callers 1

handle_closeMethod · 0.80

Calls 1

poissonTimeoutMethod · 0.95

Tested by

no test coverage detected