Open hsanjuan opened 5 years ago
This may be a race. When you ask the DHT to bootstrap, it may not yet have finished probing those new peers. If you've already added those peers, we've probably finished running the identify protocol. In this case, we may need to try "bootstrapping" with our current peer list.
This is strongly related to #283 and #295.
I have an rather annoying issue:
If I create an
IpfsDHT
on an emptyHost
, then I create a secondHost
and connect them, Bootstrapping the DHT does not seem to work (get things like `failed to find any peer in table).Bootstrapping only works if the Host was already connected to some other peer at the moment the DHT is created, and not at the moment it is asked to bootstrap (or runs a bootstrap round).
I would expect that running BootstrapOnce (or letting the default bootstrap ticker happen) would take into account the newly added peer connections after the DHT itself was created.
Let me know if I haven't explained myself clearly. Is there a workaround for this perhaps?