Module tasks

Module tasks 

Source

Functions§

add_node_task
Add a node to the DHT buckets. If the bucket is already full, we ping the least recently seen node in the bucket: if successful it becomes the most recently seen node, if the ping fails we remove it and add the new node. crate::dht::Dht::update_node() increments a channel’s usage count (in the direct session) and triggers this task. This task decrements the usage count using crate::dht::Dht::cleanup_channel().
channel_task
Send a DHT ping request when there is a new channel, to know the node id of the new peer, Then fill the channel cache and the buckets
cleanup_channels_task
Removes entries from crate::dht::Dht::channel_cache when a channel is stopped.
dht_refinery_task
Periodically send a DHT ping to known hosts. If the ping is successful, we move the host to the whitelist (updating the last seen field).
disconnect_inbounds_task
Close inbound connections that are unused for too long.
events_task
Handle DHT events.