-use looping call for running manage function rather than a scheduled
callLater
-track announce speed
-retry store requests that failed up to 3 times
-return a dict of {blob_hash: [storing_node_id]} results from
_announce_hashes
_refreshRoutingTable inline cb refactor
-add and use DeferredLockContextManager
-don't trap errback from iterativeFindNode in iterativeAnnounceHaveBlob
This method can be used by other components to check
if in the Node routing table there is at least one peer.
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>
If a node is returning a peer list for a given blob hash
(being this been requested via CLI or via DHT) and it is
part of the resulting peer list, it will filter itself out
before returning the list.
This makes the results across the DHT inconsistent as
different nodes won't include themselves when
responding a findValue/findNode query.
Remove such filtering so that the local node ID is always
included when needed.
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
When a k-bucket does not contain enough close nodes, the
DHT will look into neighbouring k-buckets in order to entend
the list of returned nodes.
However, the list should not be extended beyond its maximum size.
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>