Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
api todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolsi committed Nov 10, 2017
1 parent 45e298a commit 88c4ff4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/scorex/core/api/http/PeersApiRoute.scala
Expand Up @@ -41,6 +41,7 @@ case class PeersApiRoute(peerManager: ActorRef,
.map { peers =>
peers.map { case (address, peerInfo) =>
Map(
// todo get or empty
"declaredAddress" -> address.toString,
"nodeName" -> (peerInfo.nodeName.getOrElse("N/A"): String),
"nodeNonce" -> (peerInfo.nonce.map(_.toString).getOrElse("N/A"): String)
Expand All @@ -62,6 +63,7 @@ case class PeersApiRoute(peerManager: ActorRef,
.map { handshakes =>
val peerData = handshakes.map { handshake =>
Map(
// todo get or empty
"declaredAddress" -> handshake.declaredAddress.toString,
"nodeName" -> handshake.nodeName,
"nodeNonce" -> handshake.nodeNonce.toString
Expand Down

0 comments on commit 88c4ff4

Please sign in to comment.