2.13.ipv8.test.messaging.anonymization.mock

Module Contents

Classes

Attributes

2.13.ipv8.test.messaging.anonymization.mock.global_dht_services
class 2.13.ipv8.test.messaging.anonymization.mock.MockDHTProvider(peer: ipv8.types.Peer)

A mocked provider for DHT info.

async peer_lookup(mid: bytes, peer: ipv8.types.Peer = None) tuple[bytes, list[ipv8.types.Peer]]

Look for peers with the corresponding mid.

async lookup(info_hash: bytes) tuple[bytes, list[ipv8.types.Peer]]

Look for peers providing generic SHA-1 resources.

async announce(info_hash: bytes, intro_point: ipv8.types.Peer) None

Announce that a certain peer is serving a given SHA-1 resource.