Periodically check if the routing table is empty and, if so,
re-attempt joining the DHT network.
This check is performed in the main DHTPeerFinder loop every 60 secs.
Closes: #1093
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
In order to attempt to join the DHT several times
(i.e. when the first attempt has failed) we need to
split the components initialization from the real
joining operation.
Create node.startNetwork() to initialize the node
and keep the rest in node.joinNetwork()
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
* update known commands
* add wallet_unlock, block wallet startup on being unlocked
* add wallet_decrypt and wallet_encrypt
* wallet encryption unit tests
* added use_keyring configuration option in order to make keyring password storage optional
When contacting jsonip.com to retrieve the node external IP,
the connection might be established with IPv6 and thus return
an address belonging to that family.
This address is then used to initialize the external_ip member of
Daemon session, but unfortunately IPv6 is not yet handled well.
Using an IPv6 as external IP is currently breaking parts of the
Daemon resulting in no peer connectivity at all.
We should stick to IPv4 for time being.
http://jsonip.com/about says "ipv4-only":"https://ipv4.jsonip.com"
therefore, change the IP retrieval URL to ipv4.jsonip.com to
make sure the connection is established only using an IPv4 address.
Closes: https://github.com/lbryio/lbry/issues/971
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
previously _download_succeeded did not block on blob_completed,
presumably because even longer ago it did not block on a deriving
immediate_announce call and thus took a long time to return