Пример #1
0
def get_discovery_protocol(seed=b"seed"):
    privkey = keys.PrivateKey(keccak(seed))
    return discovery.DiscoveryProtocol(privkey,
                                       random_address(),
                                       bootstrap_nodes=[])
Пример #2
0
def get_discovery_protocol(seed=b"seed", address=None):
    privkey = keys.PrivateKey(keccak(seed))
    if address is None:
        address = random_address()
    return discovery.DiscoveryProtocol(privkey, address, [],
                                       CancelToken("discovery-test"))
Пример #3
0
def get_discovery_protocol(seed=b"seed"):
    privkey = keys.PrivateKey(keccak(seed))
    return discovery.DiscoveryProtocol(privkey, random_address(), [],
                                       CancelToken("discovery-test"))