latest.ipv8.test.messaging.anonymization.mock
Module Contents
Classes
A mocked provider for DHT info. |
Attributes
- latest.ipv8.test.messaging.anonymization.mock.global_dht_services
- class latest.ipv8.test.messaging.anonymization.mock.MockDHTProvider(peer: latest.ipv8.types.Peer)
Bases:
latest.ipv8.dht.provider.DHTCommunityProvider
A mocked provider for DHT info.
- async peer_lookup(mid: bytes, peer: latest.ipv8.types.Peer | None = None) None
Look for peers with the corresponding mid.
- async lookup(info_hash: bytes) tuple[bytes, list[latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint]] | None
Look for peers providing generic SHA-1 resources.
- async announce(info_hash: bytes, intro_point: latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint) None
Announce that a certain peer is serving a given SHA-1 resource.