use of io.nuls.network.message.entity.NodesIpEvent in project nuls by nuls-io.
the class GetNodesIpEventHandler method process.
@Override
public NetworkEventResult process(BaseEvent event, Node node) {
List<Node> availableNodes = getNetworkService().getAvailableNodes();
List<String> ipList = new ArrayList<>();
for (Node n : availableNodes) {
ipList.add(n.getIp());
}
NodesIpEvent ipEvent = new NodesIpEvent(ipList);
return new NetworkEventResult(true, ipEvent);
}
Aggregations