mirror of
https://github.com/status-im/status-go.git
synced 2025-02-02 09:56:52 +00:00
9268f55d7d
When the node registers topics, Discovery V5 should never be stopped as otherwise, no peer will be able to find the node.
Peer pool signals
Peer pool sends 3 types of signals.
Discovery started signal will be sent once discovery server is started. And every time node will have to re-start discovery server because peer number dropped too low.
{
"type": "discovery.started",
"event": null
}
Discovery stopped signal will be sent once discovery found max limit of peers for every registered topic.
{
"type": "discovery.stopped",
"event": null
}
Discovery summary signal will be sent every time new peer is added or removed from a cluster. It will contain a map with capability as a key and total numbers of peers with that capability as a value.
{
"type": "discovery.summary",
"event": {
"shh/6": 1
}
}
Or if we don't have any peers:
{
"type": "discovery.summary",
"event": {}
}