use of network.bisq.api.model.BitcoinNetworkStatus in project bisq-api by mrosseel.
the class BisqProxy method getBitcoinNetworkStatus.
public BitcoinNetworkStatus getBitcoinNetworkStatus() {
final BitcoinNetworkStatus networkStatus = new BitcoinNetworkStatus();
final List<Peer> peers = walletsSetup.connectedPeersProperty().get();
if (null != peers)
networkStatus.peers = peers.stream().map(peer -> peer.getAddress().toString()).collect(Collectors.toList());
else
networkStatus.peers = Collections.emptyList();
networkStatus.useTorForBitcoinJ = preferences.getUseTorForBitcoinJ();
networkStatus.bitcoinNodesOption = BitcoinNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
networkStatus.bitcoinNodes = preferences.getBitcoinNodes();
return networkStatus;
}
Aggregations