This commit is contained in:
@@ -136,6 +136,7 @@ func (n *Node) peersHandler(w http.ResponseWriter, r *http.Request) {
|
||||
var list []Peer
|
||||
list = append(list, n.self)
|
||||
for _, p := range n.peers {
|
||||
//p.Self = false
|
||||
list = append(list, *p)
|
||||
}
|
||||
writeJSON(w, http.StatusOK, list)
|
||||
@@ -421,6 +422,7 @@ func (n *Node) PeerList() []Peer {
|
||||
out = append(out, n.self)
|
||||
for _, p := range n.peers {
|
||||
cp := *p
|
||||
cp.Self = false
|
||||
out = append(out, cp)
|
||||
}
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user