Skip to content

Error during boostraping #16

@ML-K-eng

Description

@ML-K-eng
def search_dht(dht, info_hash):
    peers = []
    for i in range(0, 5):
        peers = dht.get_peers(binascii.a2b_hex(info_hash))
        time.sleep(1.5)

    return peers


if __name__ == '__main__':
    dht = btdht.DHT()
    dht.start()  # now wait at least 15s for the dht to boostrap
    print("Initializing DHT", flush=True)
    time.sleep(20)
    print(search_dht(dht, '756D9FA81E9328A97A03EE134EBCA8C2CCE3B670'))

The output I get is

init socket for b'0c66c99cafff75350028b3ec10845835c75921b5'
Initializing DHT
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
None

I can't really find what "0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s" mean in the documentation. Why would I be getting this "error" and not the expected (IP, PORT) outcome?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions