(self, streamNumber, hashid)
| 84 | self.objectsNewToMe[hashId] = True |
| 85 | |
| 86 | def handleReceivedObject(self, streamNumber, hashid): |
| 87 | for i in network.connectionpool.BMConnectionPool().inboundConnections.values() + network.connectionpool.BMConnectionPool().outboundConnections.values(): |
| 88 | if not i.fullyEstablished: |
| 89 | continue |
| 90 | try: |
| 91 | del i.objectsNewToMe[hashid] |
| 92 | except KeyError: |
| 93 | if streamNumber in i.streams and \ |
| 94 | (not Dandelion().hasHash(hashid) or \ |
| 95 | Dandelion().objectChildStem(hashid) == i): |
| 96 | with i.objectsNewToThemLock: |
| 97 | i.objectsNewToThem[hashid] = time.time() |
| 98 | # update stream number, which we didn't have when we just received the dinv |
| 99 | # also resets expiration of the stem mode |
| 100 | Dandelion().setHashStream(hashid, streamNumber) |
| 101 | |
| 102 | if i == self: |
| 103 | try: |
| 104 | with i.objectsNewToThemLock: |
| 105 | del i.objectsNewToThem[hashid] |
| 106 | except KeyError: |
| 107 | pass |
| 108 | |
| 109 | def hasAddr(self, addr): |
| 110 | if haveBloom: |
no test coverage detected