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

Method delete

src/inventory.py:172–184  ·  view source on GitHub ↗
(self, objectHash=None)

Source from the content-addressed store, hash-verified

170 self.lastCleared = time.time()
171
172 def delete(self, objectHash=None):
173 if not hasattr(current_thread(), 'peer'):
174 return
175 if objectHash is None:
176 return
177 with self.lock:
178 try:
179 if objectHash in self.hashes and current_thread().peer in self.hashes[objectHash]['peers']:
180 self.hashes[objectHash]['sendCount'] += 1
181 self.hashes[objectHash]['peers'].remove(current_thread().peer)
182 except KeyError:
183 pass
184 self.clearHashes(objectHash)
185
186 def stop(self):
187 with self.lock:

Callers 1

runMethod · 0.80

Calls 1

clearHashesMethod · 0.95

Tested by

no test coverage detected