(self, source="other")
| 128 | |
| 129 | # Found a peer from a source |
| 130 | def found(self, source="other"): |
| 131 | if self.reputation < 5: |
| 132 | if source == "tracker": |
| 133 | self.reputation += 1 |
| 134 | elif source == "local": |
| 135 | self.reputation += 3 |
| 136 | |
| 137 | if source in ("tracker", "local"): |
| 138 | self.site.peers_recent.appendleft(self) |
| 139 | self.time_found = time.time() |
| 140 | |
| 141 | # Send a command to peer and return response value |
| 142 | def request(self, cmd, params={}, stream_to=None): |
no outgoing calls
no test coverage detected