Get Inactive nodes

+1 vote
I'm trying to find a way to measure the health of the network. So I would like to know if it's possible to retrieve the inactive nodes (nodes that have permissions to connect and perform transaction but are currently offline) in the network. I know that each node is not necessarily connected to all other nodes (depending on network size), so getting all nodes that have connect permissions and removing the nodes that "my" node is connected to will not give me all the inactive nodes as that is not necessarily true. It could just be that my node is not connected to it. So what are my options? If I'm not able to get all the inactive nodes, is there a way to get all the nodes that "my" node was previously connected to but is no longer connected to? Can this be used to determine an inactive node? Also, I have read that depending on the network size, each node can be connected to all other nodes, is there a set max number of nodes? Is it possible to know the limit? Thanks for the help.
asked Jan 17, 2019 by zaidoon

1 Answer

0 votes
 
Best answer

There isn't currently an official mechanism built in for this, but you could monitor the getpeerinfo command response at regular intervals to look for nodes whose connection has been lost. See also the maxconnections runtime parameter which controls the maximum number of other nodes that this node will connect to.

answered Jan 17, 2019 by MultiChain
selected Jan 17, 2019 by zaidoon
...